X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Ffx.js;h=d5185c58db2213a6d0f8f700b75f6f49206c5a1b;hb=ea44348fdb8d039dd74684cdafc6c73430f297b3;hp=b4606a82fc49250a6effe0adaafdfe9ab1ca5614;hpb=17640273705d1450b806bb5c8e71c2849d864a37;p=jquery.git diff --git a/src/fx.js b/src/fx.js index b4606a8..d5185c5 100644 --- a/src/fx.js +++ b/src/fx.js @@ -10,6 +10,9 @@ jQuery.fn.extend({ if ( jQuery.css(this,"display") == "none" ) { var elem = jQuery("<" + this.tagName + " />").appendTo("body"); this.style.display = elem.css("display"); + // handle an edge condition where css is - div { display:none; } or similar + if (this.style.display == "none") + this.style.display = "block"; elem.remove(); } }).end(); @@ -32,7 +35,7 @@ jQuery.fn.extend({ toggle: function( fn, fn2 ){ return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? - this._toggle( fn, fn2 ) : + this._toggle.apply( this, arguments ) : fn ? this.animate({ height: "toggle", width: "toggle", opacity: "toggle" @@ -185,8 +188,7 @@ var queue = function( elem, type, array ) { var q = jQuery.data( elem, type + "queue" ); if ( !q || array ) - q = jQuery.data( elem, type + "queue", - array ? jQuery.makeArray(array) : [] ); + q = jQuery.data( elem, type + "queue", jQuery.makeArray(array) ); return q; };