Skip to content

Instantly share code, notes, and snippets.

@RaffaeleSgarro
Created August 29, 2012 08:46
Show Gist options
  • Save RaffaeleSgarro/3508703 to your computer and use it in GitHub Desktop.
Save RaffaeleSgarro/3508703 to your computer and use it in GitHub Desktop.
Disable Buddypress callbacks on elements flagged with "button" class
// Elements having "button" class will not fire the buddypress callbacks
$.each( $( ".item-list-tabs" ).data( "events" ).click, function ( i, obj ) {
var oldHandler = obj.handler;
obj.handler = function ( event ) {
if ( $( event.target ).hasClass( "button" ) )
return true;
else
return oldHandler( event );
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment