I\'m looking to find the position (i.e. the order) of a clicked element within a list using jQuery.
I have:
Element 1
Use index():
$("li").click(function() { var index = $(this).parent().children().index(this); alert("You clicked item " + index); });
Indexes start at 0.