Created
April 25, 2013 14:24
-
-
Save BartlomiejSkwira/5460099 to your computer and use it in GitHub Desktop.
Bind event to closest ancestor when bound element is reloaded using JavaScript 'on'
This file contains 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
// use a closer ancestor that is NOT destroyed. Best option if you can | |
$('#someAncestor').on('click', '.something', function() { /* ... */ }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment