Skip to content Skip to sidebar Skip to footer

Set Click Event On Leaf Node

i have this type of html :-
  • Activities
    • Physical1
      • Cricket
        • One Day<

Solution 1:

Sounds like you need to modify the HTML, Anyways try this:

Working Demo

$('li:not(:has(*))').click(function(){
     $('#result').text($(this).text());
});


<divid="result"></div>

Solution 2:

Post a Comment for "Set Click Event On Leaf Node"