Opened 15 years ago
Closed 13 years ago
#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@… |
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(); },
Change History (5)
comment:1 Changed 15 years ago by
Priority: | critical → minor |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
comment:2 Changed 15 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
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 15 years ago by
Component: | core → fx |
---|---|
Milestone: | 1.2.2 → 1.2.4 |
need: | Patch → Review |
Type: | bug → enhancement |
comment:4 Changed 14 years ago by
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?
comment:5 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Since this is long-documented behavior that would likely break existing code if changed, I'll close this ticket.
The show and hide methods deal only with the display property.