Last active
December 12, 2015 09:28
-
-
Save andreas-marschke/4751200 to your computer and use it in GitHub Desktop.
When you have a set of collapsibles inside a modal events from inside like "shown" are bubbling up. So unless you make sure it's only the modal you are listening to, the callback will fire anyway. Better make sure it only happens once.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#modal").modal({ | |
show: true, | |
backdrop: true, | |
keyboard: true | |
}).on("shown",function(e) { | |
/* suppress 'shown' events bubbling up from inside */ | |
if ($(e.target).hasClass('modal')){ | |
/*do something*/ | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment