/ Published in: JavaScript
Expand |
Embed | Plain Text
$("#step li").each(function (i) { i = i+1; $(this).addClass("item" i); }); -- Alt $("#step li").each(function (i) { $(this).addClass("item" + (++i)); }); $("#commentlist li").each(function (i) { i = i+1; $(this).prepend('<span class="commentnumber"> #' i '</span>'); });
You need to login to post a comment.
