I have an element that contains many components inside it. Lets you call this item. Now inside the box I have many different elements, images, text and buttons.
Example: http://jsfiddle.net/roman_khrystynych/FSCRH/
HTML:
<div id="container"> <div class="box"> <div class="button">Click</div> </div> </div>
JQuery
$('#container').on("click", ".box", function(){ alert('box'); //only when anything in box except button }); $('#container').on("click", ".button", function(){ alert('button'); //only when button clicked });
The problem is that when a button is clicked, the window element also activates its actions. Essentially, I want this to be an exception, if I click on a button, normal mailbox actions do not occur, but button actions act instead. Any suggestions?
source share