我有 jquery 选项卡的问题。如果我绑定到选项卡的 tabsselect 或 tabsshow 事件,它们不会被触发。
我正在使用最新的 jquery-ui 1.10.3,并且我的 webapp 控制台中没有 js 错误。
代码:
$("#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();
}
});