Skip to content

Instantly share code, notes, and snippets.

@pomeh
Created February 11, 2012 21:19
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 pomeh/1804285 to your computer and use it in GitHub Desktop.
Save pomeh/1804285 to your computer and use it in GitHub Desktop.
Get jQuery events informations
jQuery.fn.getEvents = function( type ) {
var evts = jQuery._data( this[0] ).events;
return evts && evts[type] || evts;
};
// usage
jQuery( "#foo" ).getEvents();
jQuery( "#foo" ).getEvents( "click" );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment