I have an html list with the following structure:
<ul id="dunderList">
<li>Characters</li>
<div>
<li>scott</li>
<li>halpert</li>
<li>beasley</li>
<li>schrute</li>
</div>
</ul>
I want to toggle the div on click of the first ul with the id 'dunderList' but limit it to only click of that element. Right now with my jquery code even if I click the child list the div toggles.
js:
$(document).on('tap', '#dunderList', function() {
$(this).find('div').toggle();
});
So, if I click on 'scott' the list shouldn't toggle but right now it does.