Hi,
I'm using a hacked superfish menu (not the module) for menu item fade-ins. It works, but the problem is that each time the page loads, the menu appears with its sub-menu items expanded for a few seconds (depending on connection speed). Basically until the page contents are completely loaded.
You can see what I mean here: www.worldyoganetwork.com
The problem is made very clear when using firefox if password manager is active for the site. When the firefox popup asking for the master password appears, it stall loading of the site, leaving the menu items expanded.
I'm using the following code to call the superfish script:
$(document).ready(function() {
$('#superfish-inner ul').superfish({
...
}
}
Using:
superfish v1.4.8.
jQuery v1.4.2
I don't know much about jquery, but I believe this is the correct way to call it, in theory.
I've tried looking at the 'Net' output in firebug, but can't see what might be causing it.
I've also tried rearranging the call order of javascript stuff, but all to no avail.
It also happens on my local version, so I don't think it's just a connection speed issue.
It's been like this for a while, so any help or suggestions would be really appreciated on this one! Thanks!
Comments
Same effect, in our case with the module
We are running into the same effect, with the Superfish menu expanding on page load. In our case we are using the module. We're working on troubleshooting it now, and I'll post anything we find or links to solutions.
Thanks. To elaborate a
Thanks. To elaborate a little, here is the order in which my js is called (local version):
Tried rearranging/removing a few (not exaustively) but not much difference noticed. Removing admin menu makes the page load faster, but the problem still occurs, albeit more briefly.
This sounds like your CSS
This sounds like your CSS doesn't hide the elements. If the script hides the elements then they will be visible until the script is loaded and run. Apply display: none to the secondary uls in your stylesheet, that will hide the menu.
Thanks werner, that seems to
Thanks werner, that seems to have fixed it! Added a rule in the stylesheet to ul tag *before* it gets any classes appended, i.e.:
Thanks!
Seems to have done the trick for me too. Had been annoying me ages!