View Full Version : slow loading time of ddlevelmenu

04-29-2009, 06:38 AM
Hi, i am trying your menu ddlelvemenu, but it seems to look slow in loading, the whole menu loads after the whole page load, i placed the javascript at the top of the page, and try all permutations and combination, looking for good technical reply

04-29-2009, 09:56 AM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

Yep, the menu is initialized after the page has fully loaded, which if your page contains a lot of graphics/text may appear slow. You can have the menu initialized sooner, by changing the initialization code on your page:

<script type="text/javascript">
ddlevelsmenu.setup("ddtopmenubar", "topbar") //ddlevelsmenu.setup("mainmenuid", "topbar|sidebar")

Move it from the head of your page to the very bottom of the document, and slightly modified:

<script type="text/javascript">
ddlevelsmenu.init("ddtopmenubar", "topbar") //ddlevelsmenu.init("mainmenuid", "topbar|sidebar")