Let's say I have some jQuery EasyUI tabs within some other tabs. The inner tabs are loaded via Ajax on click of an outer tab. On click of an inner tab, I want to load some content via Ajax inside the clicked inner tab's panel. The problem I have is that because the inner tabs are loaded via Ajax, I cannot use this:
$('.inner_tabs').tabs({
onSelect: function(title, index){
// do stuff
}
});
to load content in my inner tab panel (because the inner tabs are added later in the DOM (So, $('.inner_tabs')
is not even recognized). I know usually this problem is fixed by using the .on()
method of jQuery. But how can I apply this to my current situation? How can I use .on()
with the onSelect
callback of jQuery EasyUI?