Is it possible to prevent the function on the When clicking the button element
Here is how to master this problem.
Say you have a parent element and some child elements.
1.(1st case) You want the parent click to do not affect the child clicks. Just put at the parent element the .self
modifier:
Child1
Child2
Child3
See it in action here
note: if you remove the .self
when you click a child, the parent event will fire too.
2.(2nd case) You have the below code:
Click to activate
The problem is:
The solution to this is to put the .stop
modifier to the icon element so the parent event will not fire.
See it in action here