Skip to content

Instantly share code, notes, and snippets.

@calvinmetcalf
Created January 28, 2013 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calvinmetcalf/4654646 to your computer and use it in GitHub Desktop.
Save calvinmetcalf/4654646 to your computer and use it in GitHub Desktop.
events
//instead of structuring them like this
$("#someID").on("click", function(e){
e.preventDefault();
doStuff();
});
//I had to hang it all of the main div
$("#body").on("click", "#someID", function(e){
e.preventDefault();
doStuff();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment