jQuery UI选项卡禁用选项卡导航 [英] jQuery UI tabs disable tab navigation
本文介绍了jQuery UI选项卡禁用选项卡导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用禁用标签导航
I tried to disable tab navigation using
var $tabs = $("#tabs").tabs({
select: function(event, ui) { return false; }
});
但是,这也会禁用我用于导航的流链接:
However, this also disables the flow links I'm using for navigation:
$('input.nexttab').click(function() {
var tab_num = $tabs.tabs('option', 'selected');
// error check this tab before proceeding
if ( check_tab(tab_num) ) {
$tabs.tabs('select', tab_num + 1 );
}
});
理想情况下,我想禁用当前选项卡右侧的选项卡的选项卡导航,并确保我的<<<< prev and next>>标签导航按钮始终有效.
Ideally, I'd want to disable tab navigation for tabs to right of current tab, and ensure my <<prev and next>> tab navigation buttons always work.
有什么建议吗?
推荐答案
您是否尝试过设置事件选项到不太可能触发的事件(如果有的话)?
Have you tried setting the event option to something that isn't likely to be fired (if at all)?
例如:
$('#tabs').tabs({ event: 'change' });
或
$('#tabs').tabs({ event: '' }); //probably better
这篇关于jQuery UI选项卡禁用选项卡导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文