Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    21
    Thanks
    12
    Thanked 0 Times in 0 Posts

    bind .click() to container excluding child elements

    Hi,

    I have a container which has a .click() event handler bound to it. The problem is that the .click() function is also being called when I click on child elements within the container. How do I stop the click event from propagating up past child elements?

    Thank you.

    Edit: Sorry found the solution, event stopPropagation();
    Last edited by AmmarIdris88; 11-26-2011 at 04:43 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •