JQuery UI tabs get previously selected tab

丶灬走出姿态 提交于 2020-01-05 04:04:20

问题


I need to select the previously active tab when i click the new tab .How do i do that ?


回答1:


$('#edit_tabs').tabs(  {
        selected: 2,     // which tab to start on when page loads
        select: function(e, ui) {
            var t = $(e.target);
            alert( "selected is " + t.data('selected.tabs') )
            // Index of the PREVIOUSLY selected tab 
            return true;

        }
});


来源:https://stackoverflow.com/questions/8664658/jquery-ui-tabs-get-previously-selected-tab

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