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

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -