jquery accordion with dynamic content
Asked Answered
A

2

1

My initial page has an empty div. An ajax transaction fills it with suitable h3/div content. If I call .accordion() before there's any content, it has no effect. If I call it after the first content is loaded, the first content looks good. Calling it a second time, however, does not work. Do I really need to destroy and redo?

Aquiline answered 8/5, 2011 at 12:20 Comment(0)
A
4

At the moment you have to destroy and re-create the whole thing using the official stable release. There is already a feature request for it, scheduled for 1.next: http://bugs.jqueryui.com/ticket/4672

If you have a read above, mrfr0g says he built a custom accordion based on jQuery UI 1.8.2, give that a try.

Apo answered 8/5, 2011 at 15:42 Comment(2)
The link that mrfr0g provide is broken, do you have any more info on this. I am in to the same situation.Dissipated
Sorry, I have no idea about the implementation. However, if you have a look at the last post in the bug discussion by TheDoci, he's demonstrating that the plugin is buggy and has a jsfiddle link as well. It seems the whole original plugin code is pasted in there. See if that helps you.Apo
N
1

give the inner DIV of each tab an id and use document.getElementById("content1").innerHTML = "HelloEveyOne345443333334422" to dynamically change the content of each tab

Negatron answered 28/12, 2011 at 12:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.