Ticket #2029 (closed enhancement: wontfix)
.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@… |
| Blocking: | Blocked by: |
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();
},
Change History
comment:1 Changed 5 years ago by brandon
- Priority changed from critical to minor
- Status changed from new to closed
- Resolution set to wontfix
comment:2 Changed 5 years ago by yereth
- Status changed from closed to reopened
- Resolution wontfix 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
comment:3 Changed 5 years 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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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