Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var lastItemNumber = /([0-9]+)$/.test($("#myList li:last").html()) ? RegExp.$1 : 0;
- var i = 0;
- while(i != 5) {
- i++;
- $("#myList").append("<li>List item " + (parseInt(lastItemNumber) + i) + "</li>");
- }
Advertisement
Add Comment
Please, Sign In to add comment