0
我正在使用jQuery选项卡,每个选项卡都有变量高度。 当我选择一个选项卡时,我需要刷新div中的内容以适应出现/消失的窗口滚动。选择事件后的jquery
查看tabs插件的API文档,有load事件和一个select事件。我似乎无法找到任何其他可以插入的事件。
加载事件工作正常,但是当选择已加载的选项卡时,select事件在内容显示之前触发。
$("#tabs").tabs({
cache: false,
select: function (e, ui) {
// running the event here will not work as it runs before the content is diplayed
},
load: function (event, ui){
// running it here works ok as it fires the event after the content is displayed
}
});
我需要在显示内容后触发事件。
是否有可以插入此特定行为的事件?
您正在使用哪个版本的jqueryUI? – 2013-03-07 18:03:43
我正在使用1.8.4 – 2013-03-08 08:36:49
嗯。我确定我正在查看与您相同的[API文档](http://api.jqueryui.com/1.8/tabs/)。如果'show'事件不起作用,也许你可以在'select'处理程序中配置一个定时器,以在250 ms后触发?不是一个真正的解决方案,但如果它完成了这项工作...... – 2013-03-08 14:52:13