Dynamically loading accordion items - Problem
Hello jQuery UI forum,
I have a DIV which I'm dynamically populating with messages.
I'm building the DIV's innerHTML on the fly.
However, I'm unable to make the messages be presented as an Accordion.
When loading statically (i.e. in advanced, I get a pretty accordion).
Hope you can help.
function loadMails(){
var accord=document.getElementById("accordion"); //get msg table object
var inner=populateAccordion("inbox");
accord.innerHTML=inner;
$(function(){
// Accordion
$("#accordion").accordion({
header: "h3",
collapsible: true,
autoHeight: false,
navigation: true
});
});
}