I have a div and when I click, it opens a menu. In that div i have a nested div, and when I click on, it opens the same menu which is also logical.
Now I want when I press the nested div it doesn’t open the menu.
How can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can bind a
clickevent handler to the innerdivand stop the propagation of the event there:That will prevent the event from bubbling up to the parent element, where it would cause the click event handler bound to it to fire.