git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix check for browser.mozilla so that Safari is not flagged as mozilla.
[jquery.git]
/
src
/
event
/
event.js
diff --git
a/src/event/event.js
b/src/event/event.js
index
34d530a
..
051ba00
100644
(file)
--- 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
// 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.
/**
* 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
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;
// 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
}) :
// Otherwise, execute the old toggle function
- this._toggle();
+ this._toggle.apply( this, arguments );
},
/**
},
/**
@@
-1634,8
+1634,9
@@
new function(){
// Use the defer script hack
var script = document.getElementById("__ie_init");
script.onreadystatechange = function() {
// Use the defer script hack
var script = document.getElementById("__ie_init");
script.onreadystatechange = function() {
- if ( this.readyState == "complete" )
- jQuery.ready();
+ if ( this.readyState != "complete" ) return;
+ this.parentNode.removeChild( this );
+ jQuery.ready();
};
// Clear from memory
};
// Clear from memory