X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Ffx.js;h=c613f938dad3dbe58fa5ad328067ccc6bb5c2f6e;hb=01e8f33e44b8ee4aa61b48d60cfcae34ac12fcf1;hp=52225c8a4d6bbac42b068c6c85bc15f8000aaa93;hpb=ffbedf0262b3eea906f39c0115b818d7456a3994;p=jquery.git diff --git a/src/fx.js b/src/fx.js index 52225c8..c613f93 100644 --- a/src/fx.js +++ b/src/fx.js @@ -6,9 +6,12 @@ jQuery.fn.extend({ }, speed, callback) : this.filter(":hidden").each(function(){ - this.style.display = this.oldblock ? this.oldblock : ""; - if ( jQuery.css(this,"display") == "none" ) - this.style.display = "block"; + this.style.display = this.oldblock || ""; + if ( jQuery.css(this,"display") == "none" ) { + var elem = jQuery("<" + this.tagName + " />").appendTo("body"); + this.style.display = elem.css("display"); + elem.remove(); + } }).end(); }, @@ -20,8 +23,6 @@ jQuery.fn.extend({ this.filter(":visible").each(function(){ this.oldblock = this.oldblock || jQuery.css(this,"display"); - if ( this.oldblock == "none" ) - this.oldblock = "block"; this.style.display = "none"; }).end(); }, @@ -417,4 +418,4 @@ jQuery.fx.step = { _default: function(fx){ fx.elem.style[ fx.prop ] = fx.now + fx.unit; } -}; +}; \ No newline at end of file