Remove todos os manipuladores de eventos que foram anexados aos elementos
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
/** | |
* Removes all previously-attached event handlers from the elements. | |
*/ | |
$.fn.unbindAll = function() { | |
var events = $(this).data('events'); | |
return this.each( function() { | |
var $this = $(this); | |
for ( var evt in events ) { | |
$this.unbind(evt); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment