Results 1 to 3 of 3

Thread: Simple Tree Menu - page loading question

  1. #1
    Join Date
    Mar 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Simple Tree Menu - page loading question

    1) Script Title: Simple Tree Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/navigate1.htm

    3) Describe problem: The menu appears to work fine. My only problem is that when the page first loads, it often displays all of the submenus for a second or two, and then (once the code gets to the javascript?) hides the submenus. This can lead to some awkward looking pages while the page is loading, since some of the submenus are rather long. However, the page always ends up looking correct once it is loaded.

    Here is the page I am working on.
    http://www.amrms.com/clients/laneReport/production/

    Is this a problem that others have run into?

    thanks.

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

    Default

    Do you have the sub lists within the tree menu hidden by default via CSS:

    Code:
    .treeview li.submenu ul{ /*Style for ULs that are children of LIs (submenu) */
    display: none; /*Hide them by default. Don't delete. */
    }
    If so the sub lists should be hidden by default, without having to wait for the script to be run. The drawback is that for people without JS enabled, the sublists will be hidden as well, without any way of expanding them.

  3. #3
    Join Date
    Mar 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes, that code is in my stylesheet.

    I tried placing style="display: none;" directly in the <ul> tags in the code, and this seemed to fix the problem.

    Thanks.

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
  •