Reputation: 1
I want to fire an event when the tab loads, I already tried something like this:
$("#tabInicio").tabs({
activate: function (event, ui) {
if (ui.newTab.length != 0 && ui.newPanel.length != 0) {
alert("XXXXX");
}
}
});
Upvotes: 0
Views: 80
Reputation: 318302
The documentation states that there is a load
event especially for when a tab loads :
$("#tabInicio").tabs({
load: function( event, ui ) {
}
});
The activate
event is triggered after a tab has been activated, and you should make sure you're testing the length of the right properties ?
Upvotes: 3