views:

83

answers:

2

For some reason, every piece of code that's below this snippet won't run...

I don't see anything wrong with it ...

window.navigationDropdownTimeout = 0;

$(".navigation li.expanded > a").hover(function(){
  clearTimeout(window.navigationDropdownTimeout);
  $(".navigation ul ul.menu").hide();
  currentSubnav = $(this).next();
  currentSubnav.fadeIn();
  currentSubnav.hover( function(){
      clearTimeout(window.navigationDropdownTimeout);
      $(this).fadeIn("fast");
    }, function(){
      thisHere = $(this);
      window.navigationDropdownTimeout = window.setTimeout(function(){thisHere.fadeOut("fast");},1500);
  });
});
+1  A: 

It looks like you're only passing one function to $(".navigation li.expanded > a").hover(), which takes two arguments. You'll need to pass another function for the mouseout part of the hover "event", or just use .mouseover() if you only want to do your thing on mouseover.

No Surprises
A: 

Have you tried this format?:

 $(".navigation li.expanded > a").bind("mouseover",function(e){....

If nothing is happening, I would try:

 $(".navigation li.expanded > a").hover(function(){
    alert("Hello!");
 },
 function(){
    //do something to check the mouseout has triggered
 });

Or with the code above:

 $(".navigation li.expanded > a").bind("mouseover",function(e){
    alert("Hello!");
 });
Rew