I have the following HTML code:
<ul id="level1">
<li id="level21">item1</li>
<li id="level22">item2</li>
</ul>
I tried to do event bubbling for the child class <li>
using jQuery:
$(document).ready(function(){
$('#level1').on('click', function(event){
alert($(this) + ',' + event);
});
});
This code does not trigger event bubbling for both <li>
class.
Is this because the child classes do not have click events for them?
I still don't understand when event bubbling would be triggered?
`?