Created
October 20, 2014 16:51
-
-
Save norcross/e69ba895176248bc5221 to your computer and use it in GitHub Desktop.
example of using on.click with dynamic elements
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
// the idea being that the container div exists outside of the | |
// dynamic element, and the anchor link is loaded. | |
jQuery( 'div.container' ).on( 'click', 'a.dynamic-element' function (){ | |
// do your thing here | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment