Search and Top Navigation
#4004 closed bug (duplicate)
Opened January 30, 2009 03:17PM UTC
Closed January 20, 2010 03:17AM UTC
Accordion does not work when loaded later via Ajax
Reported by: | abtrapp | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.8 |
Component: | ui.accordion | Version: | 1.6rc6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The accordion standard sample (http://ui.jquery.com/demos/accordion/#default) works perfect, if it loads with the complete form.
When it is loaded via Ajax (inside of a jQuery Ajax Tab) and is initialized with:
jQuery('#payment_type').each(function(item) {jQuery(this).accordion
({header: "h3"});});
every content is set to style="... height: 0" - so all headers are attached together and the content is below them.
Attachments (0)
Change History (6)
Changed January 31, 2009 02:37AM UTC by comment:1
summary: | Accordeon does not work when loaded later via Ajax → Accordion does not work when loaded later via Ajax |
---|
Changed January 31, 2009 03:51AM UTC by comment:2
milestone: | TBD → 1.6 |
---|
I believe the real problem is that the heights are not being calculated properly if the accordion is not attached to the DOM.
Changed March 08, 2009 02:42PM UTC by comment:3
milestone: | 1.7 → 1.8 |
---|
Changed March 10, 2009 01:07PM UTC by comment:4
This sounds like a problem that I was having, that could be solved by using the options clearStyle: true and autoHeight: false. However, in 1.6rc6 there is a bug which throws an error in IE when using these options. This is supposed to be fixed in trunk though ( http://dev.jqueryui.com/ticket/4100 )
Changed June 06, 2009 01:06PM UTC by comment:5
I had a same problem, how ever cleadStyle and autoHeight did not work for me.
The only way I managed to fix was destroying accordion and call it again.
$('#navigation').tabs({ show: function(ui) { $("#packages").tabs('destroy').tabs({ show: function(ui) { $('#offers').accordion('destroy').accordion(accordionConfig); } }); } });