I implemented your fix and unfortunately, the issue remains.

To further demonstrate the problem, I've added some YouTube videos to
the page to simulate the Flash components I have on my main example.
Now, if you load the page, and then the on one of the main menu items
to reload the page, keep your mouse over one of the main menu items
while the page is loading.

When the page finishes loading, your mouse should still be over the
main menu item, and the sub menus will not display, until you move
your mouse outside the main menu item, at which point, the states for
on/off are switched, and the menu is unusable.

I hope this makes sense. It's one pain in the ass bug.

It looks to me like while the DOM is still loading, it's seeing there
is an event (mouseenter/mouseleave) occuring and setting it's state
before the DOM is fully loaded. When the DOM finishes loading, the
states are switched, and the menu is messed up.

On Jan 10, 11:56 am, "jQuery Lover" <ilovejqu...@gmail.com> wrote:
> I suggest you take the other way. We shall not forget about beloved
> CSS :) Try this:
>
> $(document).ready(function(){
>   $('#nav li')
>     .bind('mouseenter mouseleave', function(){
>       $(this).toggleClass('menu-on');
>     });
>
> });
>
> ====================
> In your CSS file add:
> #nav div{
>   display:none;}
>
> #nav .menu-on div{
>   display:block;
>
> }
>
> Drawback is if the user is on <li> while page is being he will not see
> the div at first. He will need to move his mouse out and then in. To
> workaround this problem we can add an extra .hover() event listener to
> li's ...
>
> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>
> On Sat, Jan 10, 2009 at 9:12 PM, Ted <theodorew...@gmail.com> wrote:
>
> > Sorry, very new to Jquery (and not that skilled at js to begin with).
>
> > I think I follow what you are saying, but not having a good grasp of
> > the jquery syntax, I'm not sure exactly how to properly execute.
> > Here's what I came up with, but it's not working, so I know there's a
> > problem somewhere, but am unable to fix:

Reply via email to