Results 1 to 8 of 8

Thread: Tab Content Script Option When Javascript is Disabled

  1. #1
    Join Date
    Mar 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tab Content Script Option When Javascript is Disabled

    I like the Tab Content Script but I am wondering can it be adjusted to default to show the information in the first tab if a user has javascript disabled?

    The reason I bring this up is that I have been looking at the new test front page that Yahoo has been delivering and the middle of their new site has a couple of content tab areas. I was playing around with turning off the javascript on my browser and was surprised to see that the content of the first tabbed item remains even when javascript is turned off. For the other tabs clicking on these will send you to a linked page.

    I can't seem to get the Tab Content Script to show the first tab's content when javascript is turned off. I can get the other tabs to link to other pages so that part works.

    Any suggestions would be helpful.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    .tabcontent{
    display:none;
    }
    
    .tabcontent#sc1{
    display:block;
    }
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Great - I was close with the {display: block} but didn't have the class right.

  4. #4
    Join Date
    Mar 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    One more question on this script - is it possible for the tab background color to be different from the entire content container color? I can change the background color behind each <li> item in the tab content container but I'd like to have the whole background of the container be a different color than the tab background color. Entering a background color in #tabcontentcontainer seems not to work as it is overridden by the current class and if I disable the current class it also does not seem to work.

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    This line here:
    Code:
    aobject.style.backgroundColor=document.getElementById("tabcontentcontainer").style.backgroundColor=themecolor;
    Change:
    Code:
    aobject.style.backgroundColor=themecolor
    document.getElementById("tabcontentcontainer").style.backgroundColor = "red"; // Change the colour as you like.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Mar 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks - I'll give this a try.

  7. #7
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello Everybody

    Can I add 2 or more Tab Content Script on the same page?

    I am using one in my home page, but I want to include two or more scripts.

    Thanks a lot for your help

    Andy

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Totally unrelated to the thread.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •