» Forums
» DynarchMenu forum
» Support
» Menu Bar "Loading" Animation?
Menu Bar "Loading" Animation?
2006/06/25 21:45
Viewed 4001 times
Replies: 1/3

I just purchased DynarchMenu. Great script, but I have a question:

I notice on this website, you display a "Please wait...Loading" animation in the menu bar while it's loading. How can I implement this? It sometimes takes a couple of seconds for the menu to load, and I don't want people to become confused when they don't see a menu right away.

Also, is there any disadvantage to using the "lazy" parameter. I know you said it only improves the speed of large menus, but is there a reason NOT to use it?

Re: Menu Bar
2006/06/25 21:54
Viewed 5538 times
Replies: 1/2

I notice on this website, you display a "Please wait...Loading" animation in the menu bar while it's loading. How can I implement this? It sometimes takes a couple of seconds for the menu to load, and I don't want people to become confused when they don't see a menu right away.

This is related to the whole page, rather than the menu.  To implement it, you have to hide the menu initially (use style="display: none" for the UL that defines the menu) and immediately after you include a DIV with the "please wait" text and an animated background-image, having the ID "plsweit".

In my body.onload handler I do the following:

var div = document.getElementById("plsweit");
div.style.display = "none"; // hide it
menu = DynarchMenu.setup(...); // and show the menu

Hope this is helpful.

Also, is there any disadvantage to using the "lazy" parameter. I know you said it only improves the speed of large menus, but is there a reason NOT to use it?

Normally not, but depending on your setup, there might be cases when you can't use the lazy parameter.  A simple example is when you need to access a menu item, for instance to enable/disable it, and it's parent menu wasn't yet displayed.

When you use "lazy", the popup menus aren't created until they are actually needed, therefore you can't safely modify the state of such an item.

last
Re[2]: Menu Bar
2006/06/25 22:33
Viewed 6867 times
Replies: 1/1

OK, I understand how to do it now, but can you give me a link where I can download the animated GIF file? I can't seem to find it in the source code of this page, so I presume it's hidden somewhere in your encrypted Javascript.

last
Google