View Full Version : DDSmoothMenu -Slow at CSS styling

09-20-2009, 11:40 AM
1) Script Title: ddsmoothmenu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.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.

09-20-2009, 12:03 PM
I have uploaded 2 images to show.

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

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

So, how can I avoid the undorderedlist as shown in the first image?

09-21-2009, 06:17 AM
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:


and change it to:

jQuery(window).bind('load', function($){

09-21-2009, 01:20 PM
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.

09-22-2009, 05:39 AM
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.