Created
September 28, 2013 13:45
-
-
Save RudolfHattenkofer/6742225 to your computer and use it in GitHub Desktop.
Automatically remove and add an event so it only exists once for an element.
This file contains hidden or 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
(function ( $ ) { | |
$.fn.offon = function( name, func ) { | |
this.off( name ).on( name, func ); | |
return this; | |
} | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment