Created
August 29, 2012 08:46
-
-
Save RaffaeleSgarro/3508703 to your computer and use it in GitHub Desktop.
Disable Buddypress callbacks on elements flagged with "button" class
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
// 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