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:


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:

Change History (2)

comment:1 Changed 13 years ago by Jörn Zaefferer

Version: 1.8rc31.8

Visual Testcase: - click on second tab to see the broken Accordion.

comment:2 Changed 13 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #3905.

Note: See TracTickets for help on using tickets.