I've implementedthe gigamenu module on my web site (www.manchesternewsguild.org) and have it running my primary menu. I'm still styling it, so it's not quite pretty, but have had to stop to deal with the following: As the page loads, the entire, expanded gigamenu "flashes" open until the page finishes loading and then hides itself. A little research elsewhere indicates it's a javascript issue that can be fixed by changing the css for the menu to display:hidden, which hides the expanded menu during page load in browsers with javascript enabled, but still works when you hover on the menu after that. I tried that by adding the css html.js #gigamenu ul li { display: none; } to my style.css. That hides the menu during the page load, but the upon hovering, only the level 1 children show in the gigamenu, rather than all of the items below that, even upon hover over the level 1 links. I must be missing something, but can't figure it out. Does anyone have any clues?
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | initial-display-none-3.patch | 704 bytes | doublejosh |
| #12 | initial-display-none-2.patch | 696 bytes | doublejosh |
| #8 | initial-display-none.patch | 500 bytes | doublejosh |
Comments
Comment #1
hrpr.com commentedI got rid of the flashes and am able to display the level 2 children by adding the following:
ul.gigamenu li ul { display:none; }
ul.gigamenu li li ul { display:block; }
Unfortunately, I cannot provide a demo as I'm doing this on a test site behind my firewall. But here is a current copy of the css I'm using:
Comment #2
ManchesterNewsGuild commentedThanks, hrpr.com. That code did the trick. I've got the menus working and am styling them in my spare time.
Comment #3
Bret74 commentedHi, I'm looking for such a module, and thanks to try for me ;-)
Just a small point : Your gigamenu doesn't seem to work with GoogleChrome (nothing happens on hover). But it's ok on IE6, Firefox and Safari.
(With http://gigamenu.clients.codepositive.com, I can see the gigamenu but it's not readable)
Bye.
Comment #4
talatnat commentedWith Google Chrome 8.0.552.224 for Ubuntu it works fine for me, including the Giga Menu demo.
Comment #5
escoles commentedConfirming that fix @ #1 works in Firefox and Chrome on my Mac.
Currently the output code for the subnav elements read like this:
<ul style="display: none;" class="gigamenu menu">I suspect the flashing problem would go away without a stylesheet workaround if it read like this instead:
<ul style="display: none; visibility: hidden;" class="gigamenu menu">Comment #6
doublejosh commentedBelieve the issue is that the display:none; is added via Javascript natively in the module.
Adding display:none; in your CSS stylesheet certainly *helps* the issue, but doesn't completely solve it (depending on your setup) because the stylesheet still has to load. If you place it high-up in your aggregated CSS file (via performance) by placing it in one of the first stylesheets within your theme, then it's likely to happen before a person ever sees it.
The *best* way to do this is add it to the HTML that's rendered in the first place, which the module does not do from what I saw... though I patched it to do so.
Comment #7
escoles commentedYou're correct that adding explicit CSS doesn't solve the issue.
I haven't looked yet -- does the module allow for a theme override of the function that writes the menu code? Would be nice not to have to hack the module.
Comment #8
doublejosh commentedHere is a patch to have submenus display:none initially in the HTML rendering.
Comment #9
doublejosh commentedWorks for folks?
Comment #10
escoles commentedGetting this error after patch:
warning: Missing argument 2 for theme_gigamenu_menu_tree() in /home/memryadm/public_html/_dev/sites/all/modules/gigamenu/gigamenu.module on line 156.Comment #11
doublejosh commentedSorry, I must not have the newest version of the module. Looks like there is another argument in there now.
Will rework.
Comment #12
doublejosh commentedActually just looks like I messed up while I was creating the patch. Missed adding the argument to the initial function call.
Sorry, I'm working on a few changes to this module and trying to keep the branches separate as separate patches.
Here ya go.
Comment #13
doublejosh commented... and a re-run for coding standards with spacing.
Comment #14
escoles commentedThanks, josh. seems to be working like a charm. my php is rusty and wasn't great to begin with, so it would have been a fair amount of trial & error to get the original argument right.
Comment #15
doublejosh commentedGood good. Using on my site too.
Comment #16
doublejosh commentedCommittable?