1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Tabbed Sidebar Code: Quick question

Discussion in 'HTML & Website Design' started by mudanoman, Oct 11, 2006.

  1. #1
    I am currently trying to implement: http://wiki.wordpress.org/Tabbed Sidebar

    However, it does not seem to show #1 tab as default. Ie. when I load the page I need to click a tab before any content is displayed from tab1.

    I believe there needs to be a change somewhere where the red text is so its shown by default and does not require the onclick action before being displayed:

    <ul id="tabs">
            [COLOR="Red"]<li class="tab" id="tab1" onclick="switchOn(1);">[/COLOR]Tab 1</li>
            <li class="tab" id="tab2" onclick="switchOn(2);">Tab 2</li>
            <li class="tab" id="tab3" onclick="switchOn(3);">Tab 3</li>
            <li class="tab" id="tab4" onclick="switchOn(4);">Tab 4</li>
            <li class="tab" id="tab5" onclick="switchOn(5);">Tab 5</li>
    </ul>
    Code (markup):
    Any help appreciated. Thanks!
     
    mudanoman, Oct 11, 2006 IP
  2. DatR

    DatR Peon

    Messages:
    210
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    simply put on the <body> tag the javascript call.

    IE
    if you have now <body>

    replace with

    <body onLoad="switchOn(1);">

    that should make tab1 appear when the body loads
     
    DatR, Oct 11, 2006 IP
  3. mudanoman

    mudanoman Guest

    Messages:
    596
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #3
    DatR,

    Thanks man! I will try it out and report back if I have any problems :) Cant wait to show the finished product :D

    Best,

    Iv
     
    mudanoman, Oct 11, 2006 IP
  4. mudanoman

    mudanoman Guest

    Messages:
    596
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It seems to work great. Thank you.
     
    mudanoman, Oct 14, 2006 IP
  5. DatR

    DatR Peon

    Messages:
    210
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    no problem... so where's that finished product :)
     
    DatR, Oct 16, 2006 IP
  6. mudanoman

    mudanoman Guest

    Messages:
    596
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #6
    mudanoman, Oct 17, 2006 IP
  7. mudanoman

    mudanoman Guest

    Messages:
    596
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0