diff options
author | John Resig <jeresig@gmail.com> | 2006-08-26 03:51:03 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2006-08-26 03:51:03 +0000 |
commit | 48ec10044f011ccfe9bd232d629682b59cccbd97 (patch) | |
tree | 5410cb2a50943749f943bdd688f5b99b125290d8 /src/event | |
parent | a2af24b064bd1384c24b896fdd9c7d322954546b (diff) | |
download | jquery-48ec10044f011ccfe9bd232d629682b59cccbd97.tar.gz jquery-48ec10044f011ccfe9bd232d629682b59cccbd97.zip |
Added in a bunch of fx fixes - and hide/show/toggle are decoupled from later methods.
Diffstat (limited to 'src/event')
-rw-r--r-- | src/event/event.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/event/event.js b/src/event/event.js index 34d530a6c..d63b3a09a 100644 --- a/src/event/event.js +++ b/src/event/event.js @@ -2,7 +2,7 @@ jQuery.fn.extend({ // We're overriding the old toggle function, so // remember it for later - //_toggle: jQuery.fn.toggle, + _toggle: jQuery.fn.toggle, /** * Toggle between two function calls every other click. @@ -25,7 +25,7 @@ jQuery.fn.extend({ toggle: function(a,b) { // If two functions are passed in, we're // toggling on a click - return a && b ? this.click(function(e){ + return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; @@ -37,7 +37,7 @@ jQuery.fn.extend({ }) : // Otherwise, execute the old toggle function - this._toggle(); + this._toggle.apply( this, arguments ); }, /** |