I have the following div:
<div class="main">
<button class="quick">sample</button>
</div>
And i have this script:
$('.main').live('click', function() {
However, id like to modify it so if the button within the main is clicked, nothing happens.
This will prevent the event from bubbling up to the parent.
You should also use
.oninstead of.live(if it’s available; otherwise use.delegate).Just in case you actually need event delegation, you would do it like this: