Bug Tracker

Ticket #2029 (reopened enhancement)

Opened 9 months ago

Last modified 4 months ago

.show() ignores .visibility

Reported by: yereth Assigned to: anonymous
Type: enhancement Priority: minor
Milestone: 1.2.4 Component: fx
Version: 1.2.1 Keywords: show(), visibility
Cc: yereth@yereth.nl Needs: Review

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

Change History

Changed 9 months ago by brandon

  • priority changed from critical to minor
  • status changed from new to closed
  • resolution set to wontfix

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

Changed 8 months ago by yereth

  • status changed from closed to reopened
  • resolution deleted

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 4 months ago by flesler

  • need changed from Patch to Review
  • type changed from bug to enhancement
  • component changed from core to fx
  • milestone changed from 1.2.2 to 1.2.4
Note: See TracTickets for help on using tickets.