Fixed an edge case in show() where the css says the display should be none. In that case force 'block' so it will actually show.

This commit is contained in:
David Serduke 2008-01-12 01:06:37 +00:00
parent b91eef070d
commit d36382e9a3

View file

@ -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();