Skip to content

Commit

Permalink
Prevent double firing calling off then on
Browse files Browse the repository at this point in the history
  • Loading branch information
ccampbell committed May 11, 2013
1 parent c942d0c commit 765a66e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gator.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* GATOR.JS
* Simple Event Delegation
*
* @version 1.2.0
* @version 1.2.1
*
* Compatible with IE 9+, FF 3.6+, Safari 5+, Chrome
*
Expand Down Expand Up @@ -156,7 +156,11 @@
// if there is no event type specified then remove all events
// example: Gator(element).off()
if (!event) {
_handlers[gator.id] = {};
for (var type in _handlers[gator.id]) {
if (_handlers[gator.id].hasOwnProperty(type)) {
_handlers[gator.id][type] = {};
}
}
return;
}

Expand Down

0 comments on commit 765a66e

Please sign in to comment.