views:

263

answers:

0

I have this jQuery UI Tabs implemented. One of the tabs use AJAX to load the jQuery UI Accordion. I tried to load the Accordion after the content has been loaded. But nothing happend. Here is the code. The accordion is is Tab 2 (index 1). Anybody have a way to do this? Load the accordion based on user triggered action?

$(function() {       
   $("#tabs").tabs({
    show: function(event, ui) {
     if (ui.index == 1){
      // Execute Accordion if user click Tab 2
      $("#accordion").accordion();
     }
    }
   });
});