Jquery UI - reload selected tab?

后端 未结 5 500
粉色の甜心
粉色の甜心 2021-02-04 17:30

Is there a way to reload the selected tab I know there is the .load() function. But it wants a tab index and I don\'t seem to see a way to grab the selected tabs id.

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-04 18:22

    Simen did have the correct answer but this has now been deprecated since JQuery UI 1.9

    http://jqueryui.com/upgrade-guide/1.9/#deprecated-selected-option-renamed-to-active

    You now use 'active' instead of 'selected'

    So the code will look like:

    var current_index = $("#tabs").tabs("option","active"); $("#tabs").tabs('load',current_index);

提交回复
热议问题