If your catching the click from the “li” you can easily invoke the .index() to see which item has been clicked! Take a look at the code example below:
$('ul li').click(function(){
$(this).index();
})
Nulla facilisi. Curabitur lorem turpis, cursus id aliquam non, molestie in nulla. Nulla eleifend arcu in tellus facilisis bibendum. Integer id turpis et neque placerat interdum! Ut rutrum velit a dui malesuada vitae dictum turpis sagittis. Sed malesuada neque ut eros ultricies accumsan. Nulla facilisi. Curabitur lorem turpis, cursus id aliquam non, molestie in nulla. Nulla eleifend arcu in tellus facilisis bibendum. Integer id turpis et neque placerat interdum!
Posted dave on January 27th, 2012 / No Comment
If your catching the click from the “li” you can easily invoke the .index() to see which item has been clicked! Take a look at the code example below:
$('ul li').click(function(){
$(this).index();
})
©2012 Css-Web-Design | Error updating theme style. Please try again or contact support@adbrute.com