Reputation: 10194
I have a div called mydiv that serves as the container for my page... when someone double clicks, I do some stuff.
$('#mydiv').dblclick(function(e) {
// some stuff (**A**)
}
within that mydiv, I create jsplumb elements (which are just divs in themselves)
And when I double click on one of those, like this:
jsPlumb.bind("dblclick", function(e) {
// some other stuff (**B**)
}
but the popup for both the A and B appear.
I'd like to prevent the popup in A from happening if B is dblclicked.
Upvotes: 0
Views: 149
Reputation: 40393
You'll need to call stopPropagation
:
jsPlub.bind("dblclick", function(e) {
e.stopPropagation();
// Do the rest of your stuff
});
This will prevent the event from getting bubbled up.
Upvotes: 1