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.
1. User click a tab,
2. Tab is loaded, HTML is injected in the DOM
3. Script are executed (some script here could call .accordion on the newly injected HTML)
4. 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..
I’ve also attached the following jQuery bug report: