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


 

    I seems to select the second tab by default in my tab javascript menu.

Return to Recent Questions


Q: I am having great problems making my tab working, I seems to select the second tab by default.

I have looked in your frequent asked questions and tried the below suggestion, I have not used the registered domain as I am in the process of design.

var bselectedItem = 3;

Where 3 is the number of your menu item from the var bmenuItems parameter.
var bmenuItems =
[
["Mac Tab 1", "content1"],
["Mac Tab 2", "content2"],
["Mac Tab 3", "content3"],
["Mac Tab 4", "content4"], // selected tab
];
The ID of the item starts with 0.
Try that.

But without success?

Any idea?

Please advice


A: See, the ID of the item starts with 0.

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

var bselectedItem = 10;

["-", ] - 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
["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"], // selected tab 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

Bootstrap Popover Button Bootstrap Collapse Toggle  |  Bootstrap Modal Position  |  Bootstrap Carousel Example  |  Bootstrap Icons Button  |  Bootstrap Input Validation  | 
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 Generator | AI Website Builder | AI Website Maker | AI web design generator