(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:
Website Builder for Beginners, Bloggers, Writers, IT Companies Best AI Website Builder - Create Website Design with AI  |  Best Website Builder for Education, Software Companies, Designers, Videos  |  Website Builder for Churches, Authors, Consultants, Magazines  |  Best Website Builder for Digital Marketing Agencies, Travel Agencies, Interior Designs  |  Best AI website generator and creator - create a website with AI.  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Best AI Website Builder | Free AI Website Builder | AI Website Generator | AI Website Builder | AI web page design generator