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
Post a Comment