简体   繁体   English

禁用单击TabContainer中的tabPanel

[英]Disable clicking on tabPanel in TabContainer

I want to disable clicking and going from one tabPanel to another. 我想禁用单击并从一个tabPanel转到另一个。 Like here http://www.eldan.co.il/en/ the user can't select another step. 就像这里http://www.eldan.co.il/en/一样,用户无法选择其他步骤。 I tried something like this 我尝试过这样的事情

if (Tabs.ActiveTabIndex == 0) { Tabs.Tabs[1].Enabled = false; }

but it hides the tab... 但它隐藏了标签...

I found something that helped me. 我找到了对我有帮助的东西。

...prevent switching to the tab on click depending on form validation ...根据表单验证,防止单击时切换到选项卡

Returning false in the tabs select handler prevents the clicked tab from becoming selected. 在选项卡选择处理程序中返回false会阻止选择单击的选项卡。

$('#example').tabs({ select: function(event, ui) { var isValid = ... // form validation returning true or false return isValid; } });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM