| 
      
   | 
    | 
  
       
          
                    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: 
         
         - Oct 31, 2006 - Is it possible to use the AXAJ-Like technology and Javascript-API in css pop up 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?
 - 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 18, 2006 - The autoscroll doesn�t seem to work with the css positioning though in menu onMouseOver.
 - Dec 19, 2006 - Why submenu css pop-down not OVER the other object (frame)?
 - Jan 01, 2007 - Could you please help me with an alignnment issue with my css dropdown menu?
 - Jan 11, 2007 - How can I upgrade my css vertical menu to v.2.0?
 - Jan 24, 2007 - In firefox my css vertical javascript menu is shifted way to the right
 - Feb 06, 2007 - We use IFrames and Frameset. Will Deluxe-Menu and Deluxe menu tabs work for us?
           
               
   |