| Re: Menu Generation ¶ | |
| In order to hide the UL element you can assign a style="display: none" to it. Or even better, include it in the page CSS, i.e., if your UL has the id="menu", then you can add the following line to your CSS: #menu { display: none; }To speed things up, there are not many things you can do. The evaluation version is somehow even slower, because it contains mangled code and it takes some time for the browser to interpret it (1-2 sec.). | |
| Re[2]: Menu Generation ¶ | |
| Well, is there any way to like "prebuild" the menu, so when it parses on the page it does not neet to go find the lists then build the menu. It could just use a already built menu? Then once the menu is changed a new build would be generated. | |
| last |
| Re[3]: Menu Generation ¶ | |
| OK, I take it all back, I had my cf admin set for debugging ON, that slowed it down quite a bit. Now that is it is off it is moving right along. I will have to say, this is the best darn menu I have ever seen. Thanks | |
| last |
| Re[3]: Menu Generation ¶ | |
| Well, even if you speeded it up from server-side, there's now a menu option too--but it doesn't make sense unless your menu is really huge (100+ items). The name is “lazy” and if you enable it the menu will feature “lazy initialization” which will improve the startup time by several orders of magnitude for really big menus :-) You can read about it in the documentation. | |
| last |
| Re[2]: Menu Generation ¶ | |
| Mishoo, this isn't a good idea. Browsers with javscript DISABLED will never see the menu. | |
| last |
| Re[3]: Menu Generation ¶ | |
| OK, after telling you your method is not a good idea, then I should probably try to give you a solution ;) What we need is some way of hiding the menu via JS. The problem is that your script will only run ONLOAD which is too late (the unstyled menu will already be displayed). There are 2 ways to take care of this: 1. You could insert an inline script (inside the body, just before the menu) which does something like: 2. If you want to keep scripts in the HEAD only to avoid changing all your pages html, then you can only access 1 element (the HTML tag). So I would add a class to it some way: Then add this to your css: You would try to do this as SOON AS POSSIBLE on the page so while the page and scripts are loading the menu gets hidden. Then onload you would remove the classname from the HTML element: I would go with method 2. | |
| last |














