I’m using Jquery UI Tabs loading ajax content and I’m wondering how to retrieve:
$.data(ui.tab, 'load.tabs');
outside of .tabs()
Actually I do so:
$("#boards").tabs({
select : function(event, ui) {
$.data(ui.tab, 'load.tabs');
},
});
But I want to access ui.tab outside of .tabs() is possible? how?
You could have a variable outside of that
selectfunction, which you set inside of it. This should not be a global variable, unless absolutely neccessary though. And keep in mind that theselectfunction must have been called before at least once, before you can access that variable (because it is set inside the function, not before).That would result in something like this:
Once again, remember that you should not call
MyFunctionunless theselectfunction has been called at least once. OtherwisemyUiTabVariablewould be undefined.