From: John Resig Date: Mon, 10 Apr 2006 06:03:28 +0000 (+0000) Subject: Made it so that the height/width auto is only called when 'show' is executed. X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=904b1c337ed7b65eba0cf560a3aaaa400e1d3f74;p=jquery.git Made it so that the height/width auto is only called when 'show' is executed. --- diff --git a/fx/fx.js b/fx/fx.js index 0a8afbb..f74c19a 100644 --- a/fx/fx.js +++ b/fx/fx.js @@ -88,7 +88,7 @@ function fx(el,op,ty,tz){ z.a = function(){z.el.style[ty]=z.now+z.o.unit}; z.max = function(){return z.el["io"+ty]||z.el["natural"+tz]||z.el["scroll"+tz]||z.cur()}; z.cur = function(){return parseInt($.getCSS(z.el,ty))}; - z.show = function(){z.ss("block");z.custom(0,z.max())}; + z.show = function(){z.ss("block");z.o.auto=true;z.custom(0,z.max())}; z.hide = function(){z.el.$o=$.getCSS(z.el,"overflow");z.el["io"+ty]=this.cur();z.custom(z.cur(),0)}; z.ss = function(a){if(y.display!=a)y.display=a}; z.toggle = function(){if(z.cur()>0)z.hide();else z.show()}; @@ -112,7 +112,7 @@ function fx(el,op,ty,tz){ setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px")z.ss("none"); - if ( ty != "opacity" ) { + if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); }