UI Tabs - initializing ajax content by tab
What is the method or syntax to run different initialization functions
depending on the ajax tab that has loaded?
I'm using something like this:
$("#myTabs > ul.ui-tabs-nav").tabs({
load: function(event, ui) {
//my init functions
}
});
but I need to do different init functions for each tab
I saw this:
select: function(event, ui) {
switch (ui.index) {
case 0:
// first tab selected, do something
break;
case 1:
// second tab selected, do something
break;
case 2:
// third tab selected, do something
break;
}
}
but select fires too soon for ajax loaded tabs. So how to do something
similar for load?