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

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -