Results 1 to 5 of 5

Thread: Have to refresh the page to work properly

  1. #1
    Join Date
    Sep 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Have to refresh the page to work properly

    1) Script Title: Animated Collapsible DIV

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...edcollapse.htm

    3) Describe problem: Its not urgent, but when I go to the plain url of my site (the problem url is: http://theplace4fun.parahosting.net/downloads.htm, and I go to the 'Games' tab, the Animated DIV won't work. But when I refresh the page, it works fine. Is that just my computer, or did i do something wrong?

    Thankyou!!!
    Last edited by ddadmin; 10-14-2007 at 07:48 AM.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Weird. The links seem to work-- but they point back to parts of this site.
    I'm a bit confused.

    The bottom links seem to work regardless of refreshing.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Sep 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33 View Post
    Weird. The links seem to work-- but they point back to parts of this site.
    I'm a bit confused.

    The bottom links seem to work regardless of refreshing.
    Yes, the Tabs work fine. But its the sliding links in the Games tab that aren't working very well.

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Quote Originally Posted by djr33 View Post
    Weird. The links seem to work-- but they point back to parts of this site.
    I'm a bit confused..
    There's an error in his link that caused a 404 page to load, which is what you're seeing I believe. Anyhow, I've fixed the link.

    The problem is due to the fact that, when the page loads for the first time, the 1st tab content is the one that's visible while the others are hidden. Since the Animated Content script is in one of those DIVs that are hidden, when it tries to calculate the height of the elements it is supposed to expand/contract, it returns a 0 height, hence the appearance it's not working. When you reload the page, due to persistence, the DIV containing the Animated Content script is the one shown by default, which in turn returns the proper height values for the elements the script is animating.

    There are probably ways around this, but it would be a lot easier just to not use this script within any of your Tab Content DIVs, since it's not a critical point either way, just a visual touch...

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    No, I fixed the link, but maybe in doing so, I already did one load, however that was affecting the script.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •