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

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -