<ul><li></li><li></li><li></li></ul>
<ul><li>This is li number 1</li><li>This is li number 2</li><li>This is li number 3</li></ul>
<ol> <li></li> <li></li></ol>
$(\"li\").each(function(i) { $(this).append(\"<span>\" + i + \"</span>\");});
Let's say I have this list
What I want it to do is saying something like this:
I have searched in a long time and I havn't found anything yet, so I hope you guys can help me. If you need more details or something, just write ;)
Thanks!
Here's an illustration of it
http://img27.imageshack.us/img27/9413/unavngivetu.png
that would give you numbered li's
http://img27.imageshack.us/img27/9413/unavngivetu.png
Hope it makes more sense
$(\"li\").each(function(i) {
$(this).append(\"<span>\" + i + \"</span>\");
});
That will append a span of the number of each list element. Hopefully that'll work anyway...