Adding persistant styles to subtabs

Discussion in 'JavaScript' started by bigalo, May 28, 2008.

  1. #1
    Hello,

    I'm stuck and would really like some help. I have a horizontal tab structure with subtabs. Right now the main tabs are activated onclick and they show their respective subtabs. I would like to add the same functionality to the subtabs so that when they are clicked, the style changes and the clicked subtab shows as active. I would also like to have the cookies applied to the subtabs and subtab contents as well. I will be adding code for div layers later. Can anyone please help?

    Link to sample page:
    http://www.geocities.com/bigalo1/test_tabSubTab2.html
     
    bigalo, May 28, 2008 IP
  2. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #2
    you mean, you want them bold when you click them?
     
    crath, May 30, 2008 IP
  3. bigalo

    bigalo Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, at the very least and maybe a different color shown for the subtab selected. Also set the cookies to remember the maintab and subtab and panel selected state on refresh.
     
    bigalo, May 31, 2008 IP
  4. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #4
    just duplicate the cookie sets and style changes for the top tabs, and rewrite them for the bottom tabs and you should be fine, eh?
     
    crath, May 31, 2008 IP
  5. bigalo

    bigalo Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I have tried that and was very unsucessfull. I am very new to JavaScript. Would you be able to assist?
     
    bigalo, May 31, 2008 IP