jQuery Tabs帮助onShow函数 [英] Jquery Tabs help with onShow function
本文介绍了jQuery Tabs帮助onShow函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿,我试图弄清楚为什么我的代码没有触发选项卡的"onShow"功能.这是我的代码:
Hey all i am trying to figiure out why my code is not triggering the "onShow" function for the tabs. Here is my code:
$(document).ready(function() {
$('#tabMain > ul').tabs({ fx: {height: 'toggle'},onShow: function() {alert('onShow');} });
})
我从没看到弹出警告框显示"onShow"的消息,所以我不知道自己在做什么错了吗?
I never see the alert box pop up saying "onShow" so i do not know what i am doing wrong?
任何帮助都会很棒! :)
Any help would be awesome! :)
大卫
已解决
$(document).ready(function() {
$('#tabMain > ul').tabs({ fx: {height: 'toggle'},onShow: function() {alert('onShow');} });
$( "#tabMain > ul" ).bind( "tabsshow", function(event, ui) {alert('sdfsdf');});
})
推荐答案
最新版本的jQuery Tabs仅显示该事件.因此,请尝试以下操作:
The newest version of the jQuery Tabs calls the event just show. so try the following:
$(document).ready(function() {
$('#tabMain > ul').tabs({ fx: {height: 'toggle'},show: function() {alert('Showed');});
})
这篇关于jQuery Tabs帮助onShow函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文