Skip to content

Instantly share code, notes, and snippets.

@DawnPaladin
Created December 17, 2014 20:08
Show Gist options
  • Save DawnPaladin/9d31899a64635ad59ebe to your computer and use it in GitHub Desktop.
Save DawnPaladin/9d31899a64635ad59ebe to your computer and use it in GitHub Desktop.
Bind myFunction to an event handler and pass myArgument to it
jQuery('#element').click({param1: myArgument }, myFunction);
@DawnPaladin
Copy link
Author

Not foolproof. Sometimes this works better:

jQuery('#element').click(function(){ myFunction(myArgument); })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment