<script type="text/javascript">
$(document).ready(function(){
$("#List li").each(function (i) {
i = i+1;
$(this).prepend('<span class="commentnumber"> '+i+'. </span>');
});
});
</script>
with the html
<ul id="List">
<li>first list item</li>
<li>second list item</li>
<li>third list item</li>
</ul>
No comments:
Post a Comment