admin管理员组文章数量:1026989
I have three tabs that i'm setting active, due to a certain functionality, the last active tab might not be the one the user on. So at the end of this 3 line code i'm trying to set active the tab that the user is on:
tabPanel.setActiveTab(1);
tabPanel.setActiveTab(2);
tabPanel.setActiveTab(0);
I want to set the current tab the tab that the user is on, (the active tab). Any help on this?
I have three tabs that i'm setting active, due to a certain functionality, the last active tab might not be the one the user on. So at the end of this 3 line code i'm trying to set active the tab that the user is on:
tabPanel.setActiveTab(1);
tabPanel.setActiveTab(2);
tabPanel.setActiveTab(0);
I want to set the current tab the tab that the user is on, (the active tab). Any help on this?
Share Improve this question edited Jan 18, 2016 at 15:58 mikeb asked Jan 18, 2016 at 15:45 mikebmikeb 7272 gold badges9 silver badges35 bronze badges 6- Can you explain it again? question is unclear – Vladimir Commented Jan 18, 2016 at 15:49
- 1 Can you explain what do you want exactly? Active tab is the one which on which user is currently on. What do you want to set? Framework automatically sets the value for active tab. – Abdul Rehman Yawar Khan Commented Jan 18, 2016 at 15:51
- @Style i edit the question – mikeb Commented Jan 18, 2016 at 15:58
- @AbdulRehmanYawarKhan i edit the question – mikeb Commented Jan 18, 2016 at 15:59
- Maybe you meant enabled? You want set all 3 tabs enabled and set first one active? – Vladimir Commented Jan 18, 2016 at 16:06
1 Answer
Reset to default 3You can do something like this:
var currentTab = tabPanel.getActiveTab();
tabPanel.setActiveTab(0);
tabPanel.setActiveTab(1);
tabPanel.setActiveTab(2);
tabPanel.setActiveTab(currentTab);
I have three tabs that i'm setting active, due to a certain functionality, the last active tab might not be the one the user on. So at the end of this 3 line code i'm trying to set active the tab that the user is on:
tabPanel.setActiveTab(1);
tabPanel.setActiveTab(2);
tabPanel.setActiveTab(0);
I want to set the current tab the tab that the user is on, (the active tab). Any help on this?
I have three tabs that i'm setting active, due to a certain functionality, the last active tab might not be the one the user on. So at the end of this 3 line code i'm trying to set active the tab that the user is on:
tabPanel.setActiveTab(1);
tabPanel.setActiveTab(2);
tabPanel.setActiveTab(0);
I want to set the current tab the tab that the user is on, (the active tab). Any help on this?
Share Improve this question edited Jan 18, 2016 at 15:58 mikeb asked Jan 18, 2016 at 15:45 mikebmikeb 7272 gold badges9 silver badges35 bronze badges 6- Can you explain it again? question is unclear – Vladimir Commented Jan 18, 2016 at 15:49
- 1 Can you explain what do you want exactly? Active tab is the one which on which user is currently on. What do you want to set? Framework automatically sets the value for active tab. – Abdul Rehman Yawar Khan Commented Jan 18, 2016 at 15:51
- @Style i edit the question – mikeb Commented Jan 18, 2016 at 15:58
- @AbdulRehmanYawarKhan i edit the question – mikeb Commented Jan 18, 2016 at 15:59
- Maybe you meant enabled? You want set all 3 tabs enabled and set first one active? – Vladimir Commented Jan 18, 2016 at 16:06
1 Answer
Reset to default 3You can do something like this:
var currentTab = tabPanel.getActiveTab();
tabPanel.setActiveTab(0);
tabPanel.setActiveTab(1);
tabPanel.setActiveTab(2);
tabPanel.setActiveTab(currentTab);
本文标签: javascriptSetting active tab current tabStack Overflow
版权声明:本文标题:javascript - Setting active tab current tab - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745652815a2161420.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论