|
|
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:
- Sep 06, 2006 - The alighment of the dropdown menu is off to the right in Firefox...
- Oct 05, 2006 - Do you have a working sample of the loading bar with PHP/ MySQL?
- Oct 31, 2006 - Is it possible to use the AXAJ-Like technology and Javascript-API in css pop up menu?
- Nov 04, 2006 - There are the features that, unfortunately, cannot be done in javascript drop menu...
- Nov 07, 2006 - The menu appears perfectly in the css menu maker preview screen, but not on the page.
- Nov 24, 2006 - How do I make the css submenu appear over the adjoining frame?
- Nov 27, 2006 - In Firefox, the drop down menu html is displayed to the right of the top menu text
- Dec 09, 2006 - Is it possible to have css drop down menu items act like regular hyperlinks?
- Dec 12, 2006 - I want that menu css recognize when user has moused off the menu, and then disappear.
- Dec 14, 2006 - How to use a dhtml javascript menu item so that it opens a window at a certain size?
- Dec 18, 2006 - The autoscroll doesn’t seem to work with the css positioning though in menu onMouseOver.
|