How to Set Active Tab in jQuery Ui

后端 未结 9 1502
灰色年华
灰色年华 2020-12-08 18:51

Can you please let me know how I can set the active tab in jquery ui with a button click out of the tabs?

I have a button like:



        
9条回答
  •  误落风尘
    2020-12-08 19:08

    Inside your function for the click action use

    $( "#tabs" ).tabs({ active: # });
    

    Where # is replaced by the tab index you want to select.

    Edit: change from selected to active, selected is deprecated

提交回复
热议问题