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