jQuery onclick event for <li> tags

The Solution to jQuery onclick event for <li> tags is


Here, to get the text of the menu that triggered the event (does not seem to have any id):

 $(document).ready(function() 
 {
    $('ul.art-vmenu li').click(function(e) 
    { 
     alert($(this).find("span.t").text());
    });
 });

~ Answered on 2011-06-15 22:43:12


Most Viewed Questions: