https://github.com/gdibble/jquery-cleaneventattachment
jQuery plug-in to disattach and attach event handlers in one shortcut function
https://github.com/gdibble/jquery-cleaneventattachment
Last synced: about 1 year ago
JSON representation
jQuery plug-in to disattach and attach event handlers in one shortcut function
- Host: GitHub
- URL: https://github.com/gdibble/jquery-cleaneventattachment
- Owner: gdibble
- License: mit
- Created: 2013-10-11T21:09:00.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-23T01:53:30.000Z (about 12 years ago)
- Last Synced: 2025-06-10T17:06:51.047Z (about 1 year ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
jquery-cleanEventAttachment
===========================
jQuery plug-in to disattach and attach event handlers in one shortcut function
Helper functions to:
* $.unbind('event.namespace').bind('event.namespace', function () { /*callback*/ })
* $.off('event.namespace').on('event.namespace', '.selector', function () { /*callback*/ })
Simply call:
```
jQuery('.selector')
.cleanBind('click.test', function () {
alert('test');
});
```
or
```
$('.selector')
.cleanOn('click.test', '.otherSelector', function () {
alert('test');
});
```
*Internally uses $.on(), thus requiring >= jQuery 1.7*