Say I have a list item with 2 links in it:
<li>
<a href="foo.htm">Foo</a>
<a href="bar.htm">Bar</a>
</li>
If a user clicks on “Foo”, I want to send the user to foo.htm. If the user clicks on any part of the <li> or on “Bar”, I want to send the user to bar.htm. I’m worried if I attach a click event listener to the <li> that clicks to “Foo” will send the user to bar.htm.
Have you tried using event.stopPropagation()