Accordion

Accordion

So I'm having a problem when I append the results from AJAX to an existing accordion.  The new HTML is returned into the page.  However, the rollup doesn't appear; it's just the resulting HTML without the accordion.  You'll see the highlighted section of my code where I've tried to reinitialize it, but I'm a newb with JS as well as jQuery.


// Accordion
$("#Units").accordion({ header: "h3" });

// Dialog           
$('#NewUnitForm').dialog({

                        autoOpen: false,
                        width: 600,
                        buttons: {
                            "Ok": function() {
                                $(this).dialog("close");
                                CreateNewUnit();  // performs our ajax function
                                $("#Units").accordion({ header: "h3" });  // try to reinitialize the accordion
                            },
                            "Cancel": function() {
                                $(this).dialog("close");
                            }
                        }
});

Is it possible to create a new rollup or can I only insert ajax results into an existing one?  I appreciate the help.