Opened 13 years ago
Closed 13 years ago
#5400 closed bug (duplicate)
Error applying accordion to a hidden div
Reported by: | matdumsa | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.9.0 |
Component: | ui.accordion | Version: | 1.8 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
jQueryUI apply height:0 to panel elements children of a hidden div when the accordion plug-in is applied.
Sometimes it is necessary to apply accordion to a hidden div.. For example, using tabs which dynamically load content the following sequence of events could occur.
- User click a tab,
- Tab is loaded, HTML is injected in the DOM
- Script are executed (some script here could call .accordion on the newly injected HTML)
- accordion panel height are set to zero because $.height() return zero on hidden elements..
I’ve created a step-by-step page that reproduce this bugs with debug output. Same thing here.. Here is a demo I’ve constructed to see how it affect us..
http://team7.ath.cx:8080/~ma_dum/sandbox/demo.html
I’ve also attached the following jQuery bug report: http://dev.jquery.com/ticket/4541#comment:5
Note: See
TracTickets for help on using
tickets.
Visual Testcase: http://github.com/jquery/jquery-ui/blob/master/tests/visual/compound/accordion_tabs.html - click on second tab to see the broken Accordion.