javascript - jquery and a value of a var -
javascript - jquery and a value of a var -
i wrote code in jquery, it's working perfectly, need index value begin @ 1.
how can this? code:
$( "span.text" ).each(function( index ) { console.log( index + ": " + $( ).attr('name') ); var micaracter= $(this).attr('name'); $( "span.lista a#caracter_" + index).append(micaracter); });
then native programming method, add together 1 0 based index,
$( "span.lista a#caracter_" + (index + 1)).append(micaracter);
javascript jquery
Comments
Post a Comment