jQuery UI选项卡获取先前选择的选项卡 [英] JQuery UI tabs get previously selected tab

查看:126
本文介绍了jQuery UI选项卡获取先前选择的选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我单击新选项卡时,我需要选择以前处于活动状态的选项卡.我该怎么做?

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

推荐答案

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

        }
});

这篇关于jQuery UI选项卡获取先前选择的选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆