javascript - jquery and a value of a var -


I wrote this code in jQuery, it's working perfectly, but I want to start index number 1 the wanted.

How can I do this? This is my code:

  $ ("span.text") .each (function (index) {console.log (index + ":" + $ (this) .attr ('name ')) Var microcorrect = $ (this) .attr (' name '); $ ("span.lista a # caracter_" + index) .append (micaracter);});  

Then just do the basic programming method, add one with zero-based index, < / P>

  $ ("span.lista a # caracter_" + (index + 1)). Attachment (microcracker);  

Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -