How to change tabs programmatically in jquery-ui 1.9?

后端 未结 4 1768
没有蜡笔的小新
没有蜡笔的小新 2020-12-01 14:33

How do you change tabs programmatically with jquery-ui 1.9?

NOTE: Posting the answer because it took me more than 4 searches to find the right answe

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 14:46

    If you add an id to the tab list elements, you can simulate a click using jQuery click() method.

    For example the following will activate tab2 when clicking the button outside of the tabs:

    Container 1

    Container 2

    Container 3

提交回复
热议问题