git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a fix for easing problems (fall back to "linear" if swing doesn't exist) (bug...
[jquery.git]
/
src
/
fx
/
fx.js
diff --git
a/src/fx/fx.js
b/src/fx/fx.js
index
51e8157
..
acd5122
100644
(file)
--- a/
src/fx/fx.js
+++ b/
src/fx/fx.js
@@
-110,9
+110,13
@@
jQuery.fn.extend({
toggle: function( fn, fn2 ){
return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
this._toggle( fn, fn2 ) :
toggle: function( fn, fn2 ){
return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
this._toggle( fn, fn2 ) :
- this.animate({
- height: "toggle", width: "toggle", opacity: "toggle"
- }, fn, fn2);
+ fn ?
+ this.animate({
+ height: "toggle", width: "toggle", opacity: "toggle"
+ }, fn, fn2) :
+ this.each(function(){
+ jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
+ });
},
/**
},
/**
@@
-314,7
+318,7
@@
jQuery.fn.extend({
for ( var p in prop )
if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
return jQuery.isFunction(opt.complete) && opt.complete.apply(this);
for ( var p in prop )
if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
return jQuery.isFunction(opt.complete) && opt.complete.apply(this);
-
+
this.curAnim = jQuery.extend({}, prop);
jQuery.each( prop, function(name, val){
this.curAnim = jQuery.extend({}, prop);
jQuery.each( prop, function(name, val){
@@
-360,7
+364,7
@@
jQuery.extend({
complete: fn || !fn && easing ||
jQuery.isFunction( speed ) && speed,
duration: speed,
complete: fn || !fn && easing ||
jQuery.isFunction( speed ) && speed,
duration: speed,
- easing: fn && easing || easing && easing.constructor != Function && easing || "swing"
+ easing: fn && easing || easing && easing.constructor != Function && easing || (jQuery.easing.swing ? "swing" : "linear")
};
opt.duration = (opt.duration && opt.duration.constructor == Number ?
};
opt.duration = (opt.duration && opt.duration.constructor == Number ?