jQuery 1.3.2 - Best way to prevent events triggering on lower elements?

Posted by Stefan Kendall on Stack Overflow See other posts from Stack Overflow or by Stefan Kendall
Published on 2010-04-14T20:22:07Z Indexed on 2010/04/14 20:23 UTC
Read the original article Hit count: 267

Filed under:
|
|

I have this (simplification):

$(li).click(function{alert("test");});

<li>
   <input>
</li>

What's the best way to bind an event to li but not fire when the user clicks on the input element?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery