Trouble disabling jQuery UI tab

邮差的信 提交于 2019-12-06 06:22:06

Try

<script type="text/javascript">
  $(document).ready(function() {
      $( "#tabs" ).tabs( "option", "disabled", 2);
  });
</script>

or multi-disable

 <script type="text/javascript">
  $(document).ready(function() {
      $( "#tabs" ).tabs('option','disabled', [1, 2, 3, 4]);
  });
</script>

instead of

<script type="text/javascript">
  $(document).ready(function() {
      $( "#tabs" ).tabs( "option", "disabled", [2]);
  });
</script>

to enable tab and move to use

  $( "#tabs" ).tabs( "enable" , 1 )
  $( "#tabs" ).tabs( "select" , 1 )

*counting starts from 0

To help others following this thread I wanted to post what ended up fixing this problem.

I was using

$("#tabs").tabs("option", "disabled", [2]);

When I switched to

$("#tabs").tabs("disable", 2);

The problem was corrected.

Thanks for your help Bart and William.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!