Ticket #5010 (closed bug: invalid)
show() & hide() do not work on elements that have a hidden parent
|Reported by:||fahrvergnuugen||Owned by:|
|Keywords:||show hide slideup slidedown||Cc:|
show() and hide() (and all other toggle effects) will ignore elements that have a parent that is not visible. This may seem like correct behavior but one could make the argument that if you wanted to target hidden or visible elements you should do so with the selector and not rely on the code within show()/hide().
The current implementation limits what can be done with show & hide. The following example scenario demonstrates the problem with the current implementation:
The scenario: A page of products with attributes and descriptions. A filter for showing & hiding products based on their attribute values. A preference checkbox for showing or hiding the descriptions.
The problem: 1) User filters the products, which hides several of them 2) User turns off descriptions (developer uses .hide() on the description containers) 3) User changes the filter so that previously hidden products are now visible
In this scenario, we will now have some products with hidden descriptions and some products with visible descriptions. This is because hide() ignored the description containers on the filtered products in step 2.
- Version changed from 1.3.2 to 1.4.3
- Milestone 1.4 deleted
- Priority changed from major to low
- Status changed from new to closed
- Type changed from enhancement to bug
- Resolution set to invalid
- Milestone set to 1.5