How to get value and index of list item onClick event with jQuery? for example:
Item 1 Item 2&
Combine the use of .index() and .text() (or .html(), if you wish):
$('#uItem li').click(function() { var index = $(this).index(); var text = $(this).text(); alert('Index is: ' + index + ' and text is ' + text); });