Bug Tracker

Opened 15 years ago

Closed 13 years ago

#2311 closed bug (worksforme)

$('body').show() doesn't work

Reported by: larmelarme Owned by:
Priority: minor Milestone:
Component: core Version: 1.2.2
Keywords: Cc:
Blocked by: Blocking:


This code doesn't work on 1.2.2 and 1.2.3.

.none { display: none }
<script type="text/javascript" src="jquery-1.2.2.js"></script>
<script type="text/javascript">
<body class="none">
This isn't show.

I made simple patch.

	show: function(speed,callback){
		return speed ?
				height: "show", width: "show", opacity: "show"
			}, speed, callback) :
				this.style.display = this.oldblock || "";
				if ( jQuery.css(this,"display") == "none" ) {
				  var isbody = /^body$/i.test(this.tagName);
					var elem = (isbody) ? $(this) : 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";
					if (!isbody)

Change History (3)

comment:1 Changed 14 years ago by Nodashi

I think you should execute your show statement in the ready function

comment:2 Changed 13 years ago by petersendidit

This is working correctly in 1.4.1

comment:3 Changed 13 years ago by dmethvin

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.