JQuery UI选项卡获得以前选择的选项卡

时间:2011-12-29 06:26:48

标签: jquery-ui jquery-ui-tabs

当我点击新标签时,我需要选择以前活动的标签。我该怎么做?

1 个答案:

答案 0 :(得分:0)

$('#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;

        }
});