(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Support
  FAQ
  Contacts
  About Us
  Recent Questions


 

    Is it possible to change which tab is selected in css menu tabs

Return to Recent Questions


Q: Hi, just a quick question, is it possible to change which tab is displayed when the page is first rendered.

For instance, if you have 4 tabs, going right to left, can you load the css menu tabs with the second tab being displayed first?


A: See, if you use Tab Mode
var tabMode = 1;

var bselectedItem = 0; //main items
var bselectedSmItem = -1; //submenus

If you use
var tabMode = 0;
var bselectedItem = 0;

See, the ID of the item starts with 0.

So, if you use TabMode (var tabMode=1;):

var bselectedItem = 4;

["-", ] - separator, ID = 0
["Mac Tab 1", "content1"], ID = 1
["Subitem1","testlink.html",] ID = 2
["Subitem2","testlink.html",] ID = 3
["Mac Tab 2", "content2"], ID = 4 // selected tab
["Subitem1","testlink.html",] ID = 5
["Subitem2","testlink.html",] ID = 6
["Mac Tab 3", "content3"], ID = 7
["Subitem1","testlink.html",] ID = 8
["Subitem2","testlink.html",] ID = 9
["Mac Tab 4", "content4"], ID = 10
["Subitem1","testlink.html",] ID = 11
["Subitem2","testlink.html",] ID = 12

If you use tabs (var tabMode=0;):

var bselectedItem = 2;

["-", ] - separator, ID = 0
["Mac Tab 1", "content1"], ID = 1
["Mac Tab 2", "content2"], ID = 2 // selected tab
["Mac Tab 3", "content3"], ID = 3
["Mac Tab 4", "content4"], ID = 4





Return to Recent Questions

Related:
Bootstrap List View Bootstrap Icons Button  |  Bootstrap Grid Tutorial  |  Bootstrap Carousel Example  |  Bootstrap Form Button  |  Bootstrap Glyphicons List  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Free AI Website Builder | AI Website Builder | AI Website Generator | Website Generator AI | AI website design generator