Skip to main content

Bug Tracker

Side navigation

#2029 closed enhancement (wontfix)

Opened December 07, 2007 12:12PM UTC

Closed June 23, 2010 02:48AM UTC

.show() ignores .visibility

Reported by: yereth Owned by:
Priority: minor Milestone: 1.2.4
Component: effects Version: 1.2.1
Keywords: show(), visibility Cc: yereth@yereth.nl
Blocked by: Blocking:
Description

When .show() is called on an element which has 'visibility: hidden', it simply ignores this. I'd say .show() is a way to simply tell the element to show itself! So therefore I suggest the following solution to make .show() also work on invisible elements;

	show: function(speed,callback){
		return speed ?
			this.animate({
				height: "show", width: "show", opacity: "show"
			}, speed, callback) :
			
			this.filter(":hidden").each(function(){
				this.style.display = this.oldblock ? this.oldblock : "";
				if ( jQuery.css(this,"display") == "none" )
					this.style.display = "block";
				if ( jQuery.css(this,"visibility") == "hidden" )
					this.style.visibility = "visible";
			}).end();
	},

Attachments (0)
Change History (5)

Changed December 08, 2007 05:13AM UTC by brandon comment:1

priority: criticalminor
resolution: → wontfix
status: newclosed

The show and hide methods deal only with the display property.

Changed January 14, 2008 02:49PM UTC by yereth comment:2

resolution: wontfix
status: closedreopened

By now the discussion has continued on the jquery dev group.

Please reconsider. Brandon has already replied. See the following 2 posts for the discussion:

http://groups.google.com/group/jquery-dev/browse_thread/thread/6ca936d7e0ebad3c

http://groups.google.com/group/jquery-dev/browse_thread/thread/b747f9a937ed93d3

Changed May 16, 2008 06:19PM UTC by flesler comment:3

component: corefx
milestone: 1.2.21.2.4
need: PatchReview
type: bugenhancement

Changed January 18, 2009 04:24AM UTC by dmethvin comment:4

Elements can be hidden by changing display, visibility, opacity, or by positioning them out of the viewport (e.g., large negative margin). Up to this point hide/show have only dealt with display. Has there been a problem with that interpretation?

Changed June 23, 2010 02:48AM UTC by dmethvin comment:5

resolution: → wontfix
status: reopenedclosed

Since this is long-documented behavior that would likely break existing code if changed, I'll close this ticket.