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();
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"
return queue( this[0], type );
return this.each(function(){
- if ( this.nodeType != 1)
- return;
-
if ( fn.constructor == Array )
queue(this, type, fn);
else {
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;
};