I have problem with jquery tabs. If I bind to tabsselect or tabsshow events of tabs, they are not fired.
I am using latest jquery-ui 1.10.3 and there are no js errors in my webapp console.
Code:
$("#tabs").tabs();
$("#tabs").bind('tabsselect', function(event, ui) {
alert(ui.index); // This is never displayed
if (ui.index === 1 && plot1._drawCount === 0) {
plot1.replot();
}
else if (ui.index === 2 && plot2._drawCount === 0) {
plot2.replot();
}
});
The event is activate
$("#tabs").on('tabsactivate', function(event, ui) {
var index = ui.newTab.index();
alert(index); // This is never displayed
if (ui.index === 1 && plot1._drawCount === 0) {
plot1.replot();
}
else if (ui.index === 2 && plot2._drawCount === 0) {
plot2.replot();
}
});
Demo: Fiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With