How do I stop custom event bubbling in jQuery?
For example I have this code:
$('.myclass').bind('amodaldestroy', function(){
....does something.....
})
How do I only allow this to be triggered once on the first element it finds when bubbling? Can I just add return false
?
$('.myclass').bind('amodaldestroy', function(){
....does something.....
return false;
})