Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    50
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Tabbed Content Problem

    I am using easytabs (http://www.kollermedia.at/archive/20...th-autochange/) for a simple tabbed content box on the front of a site of mine.

    I've been testing it out, and there seems to be a brief moment as the page loads at the start where you can see all 4 tabbed boxes on display, before the page renders correctly and only 1 box is shown.

    Problem page: http://www.rouletteplanet.com/pokerbanknew/

    As you can see, as you load the page or refresh it, all 4 tabbed boxes are visible for a brief moment. The easytabs javascript can be foudn here:

    http://www.rouletteplanet.com/pokerb...js/easytabs.js

    Is there any way around this, so that the other tabbed content does not appear as the page loads?

  • #2
    New Coder
    Join Date
    Jun 2008
    Posts
    50
    Thanks
    18
    Thanked 0 Times in 0 Posts
    Would it be possible to delay the loading of a few DIV boxes to prevent them from immediately showing up?

    What would be the best way to delay a DIV from loading?

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,851
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    It's actually easy to hide all other divs when the page loads, by setting a display:none; to them and then setting a display:block to the default div, like
    Code:
    #tabcontent1, #tabcontent2, #tabcontent3, #tabcontent4 {/*screen.css (line 77)*/
    display:none;
    width:98%;
    }
    #tabcontent1{
    display:block;
    }
    But, it may cause an accessibility issue for those users who have no javascript support in their browser. Thus they are using a progressive enhancement approach. In the original page, the reason for not getting any such trouble might be due to the lesser contents in those tabs.

    You may see the advantage of the above approach, by loading the page after blocking javascript in your browser.
    Last edited by abduraooft; 03-14-2009 at 11:37 AM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    Inersha (03-14-2009)


  •  

    Posting Permissions

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