Results 1 to 5 of 5

Thread: DDSmoothMenu -Slow at CSS styling

  1. #1
    Join Date
    May 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DDSmoothMenu -Slow at CSS styling

    1) Script Title: ddsmoothmenu

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

    3) Describe problem:
    I have implemented the above menu (Horizontal) on a site and I am getting the unordered list being shown on the page in situi before the CSS styles it.
    The list is shown on the screen for approx 2secs max.

    Does anybody have an idea how to improve the CSS styling time so that the menu is styled without delay.

    I can not show you a demo as the site is still on my local development server.

    Thank you.

  2. #2
    Join Date
    May 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have uploaded 2 images to show.

    The first one is the unordered list showing for 2 secs max when the page loads

    http://www.flickr.com/photos/sean_dev/3936365651/


    And the second images is after the 2 secs when the CSS has styled the unorderedlist.

    http://www.flickr.com/photos/sean_dev/3936377763/

    So, how can I avoid the undorderedlist as shown in the first image?
    Last edited by SniffTheGlove; 09-20-2009 at 12:12 PM.

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

    Default

    This really shouldn't be an issue, since the .css files associated with the script are very small in file size, unless you have a very slow loading server perhaps. You can try modifying the behavior of the menu so it's only initialized when the page has fully loaded. Inside the .js file, find this line:

    Code:
    jQuery(document).ready(function($){
    and change it to:

    Code:
    jQuery(window).bind('load', function($){
    DD Admin

  4. #4
    Join Date
    May 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply, I will give it a go.

    I have a local apache running on my dev PC and also I have a local webserver running on my network and it happens on both, also I have uploaded to my webhost and is happens there.

    I am wondering as the page is taking awhile to load due to php database calls etc and other javascript routines etc. The other javascript routine is a script called jMyCarousel which loads up 12 small 64x64 icons.

    Thanks again for your response.

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

    Default

    PHP database calls do not play a part here, as they affect the time your page is initially loaded and HTML is output to the browser. JavaScript routines on the other hand affect the time it takes your page to finish loading, and can affect how quickly your .css files load. So the later would be where you'd try and optimize.
    DD Admin

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
  •