/ Published in: jQuery

Here’s a very simple script which adds numbers sequentially to an unordered list using jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.1.min.js"> </script> <script type="text/javascript"> $(function () { $('ul > li').each(function () { $(this).prepend("(" + ($(this).index() + 1) + ") "); }); }) </script>
URL: http://www.devcurry.com/2011/06/jquery-numbering-unordered-list.html
Comments
