avireni
4/13/2012 - 11:10 PM

filter index of an element in an unordered set

filter index of an element in an unordered set

$("ul > li").click(function () {
    var index = $(this).prevAll().length;
});