Return to Snippet

Revision: 11576
at February 10, 2009 05:55 by davebowker


Initial Code
$("#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>');
});

Initial URL

                                

Initial Description

                                

Initial Title
jQuery Sequential List

Initial Tags
class, jquery

Initial Language
JavaScript