jQuery dropdown menu mouseleave problem

http://jsfiddle.net/borayeris/sb9Ju/4/

Here is my script. How can I stop fading out if mouse is back on menu?

-------------Problems Reply------------

Try adding a call to stop() on the fadeIn:

$(function(){
var piFade;
$('#menu > li').hover(
function(){
$('#menu > li:hover > div').stop(true,true).fadeIn('slow');
},
function(){
$('#menu > li > div').fadeOut('slow');
}
);
});

http://jsfiddle.net/sb9Ju/13/

And here is a version with the delay included. I'm not a huge fan but it's not too bad with the call to stop in there.

http://jsfiddle.net/sb9Ju/15/

You set too long a delay. It still runs the original hover function. You remove it, it waits 2.5 second, then you back on it and it still removes menu from the first time you've hovered. I really don't see a reason to use delay there.

Category:javascript Views:0 Time:2011-06-14

Related post

  • problem with jquery dropdown menu 2011-05-19

    I'm trying to build a jquery dropdown menu, basically I have the left navigation which is drop down and I have a right section as well, I'm trying to make the height of the left navigation always equal to the height of the right part, it works fine o

  • Make Javascript/ jQuery dropdown menu work in IE6? 2011-02-21

    I created a dropdown menu with many ways: Javascript, Dreamweaver Spry, CSS. When tested with my medium-level security IE6, none of them works. IE6 prompted me with security warning. I tried to open other sites with IE6, their dropdown menu doesn't w

  • jquery dropdown menu (superfish) and IOS compatibility 2012-04-09

    I have been working with the superfish jquery dropdown menu (http://users.tpg.com.au/j_birch/plugins/superfish/) but I can't seem to get it working for the ipad. It works on other browsers but not touch screens. I know there's an issue with that (hov

  • jquery dropdown menu & swf 2009-06-12

    I've built a jQuery dropdown menu to float over a banner swf. For some reason in ie6 & ie7, the menu rolls behind the swf. I've tried the wmode=transparent in the code to load the flash file with no avail. I've also tried z-index in the css with

  • Does anyone know of a very simple jQuery dropdown menu with smooth fadeout (or slide-down)? 2010-02-09

    Does anyone know of a very simple jQuery dropdown menu plugin where the opacity goes down smoothly (or where the menu slides down smoothly)?? --------------Solutions------------- here are 38 jquery dropdown menu's http://www.1stwebdesigner.com/resour

  • Jquery dropdown menu is covered by a frame on a webpage 2011-02-24

    I'm using a using this jquery dropdown menu in my banner frame (mail_frame.html). when it drops down it gets covered by another frame that's below it. even though i set the z-index of the drop down to 999 in it's css, it's still behind the other fram

  • Add hoverIntent to jquery dropdown menu script 2011-03-22

    Hi everybody i want to add hoverIntent event to my jquery dropdown menu top links but i don't know how i do this please help below is my jquery code i got from http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/ i am unab

  • How to construct a database driven Jquery dropdown menu in asp.net 2011-06-01

    I am trying to build a fancy jquery dropdown menu ,while making the menu items dynamic by bringing the values of menu items from database. I am using asp.net and sql server 2005 as my database,Is their any simple article to work this? --------------S

  • JQuery - dropdown menu - mouseenter/mouseleave 2011-10-14

    I've spent at least 2 hours trying to make this work.. Basically I have a dropdown menu with items and I've tried to write something that imitates HoverIntent plugin where the user is allowed to move his mouse outside the item for a fixed number of s

  • jQuery dropdown menu should expand if parent is active 2011-03-03

    I'm making a simple dropdown menu in jQuery. And it works fine. I'm having a problem though. The problem is, that i need to keep the active page dropdown expanded In the example below the sub-menu that has the .inpath parent needs to always stay expa

  • Having an Issue with a jQuery dropdown menu 2012-01-26

    i've been researching this for about 3 hours now with no gravy so I finally caved and decided to ask here. I have a jsFiddle i hope someone can look at and help me. Essentially what is happening is that I am trying to create a simple dropdown menu an

  • jQuery Dropdown Menu goes away when mouseout 2012-03-22

    I am trying to achive the simplest Dropdown in the world with CSS and would like to animate it a little with jQuery. But the "hover" function in jQuery makes the dropdown disappear as soon as it leaves the trigger element (ul#menu li a), so you canno

  • How to fix this JQuery dropdown menu? 2009-04-02

    I tried to create a dropdown menu in JQuery, but it's proving quite difficult. My code is here: $(document).ready(function(){ $('ul li').mouseover(function() { $(this).children("ul").show(); }); $('ul li ul').mouseover(function() { $('ul li ul').show

  • Undesired "flashing" in Jquery dropdown menu? 2010-03-26

    I've got the following piece of Jquery: $("#collapse-menu > li > a").click(function() { $(this).toggleClass("expanded").toggleClass("collapsed").find("+ ul").slideToggle("medium"); }); What it basically does is expands or collapses a menu of ne

  • jquery dropdown menu, sub-menu fade effect only works after second rollover 2010-11-25

    I have made a dropdown menu using css and jQuery, with :hover triggering the submenu if JS not enabled. Though apart from in IE, on rollover the effect will not work first time. If I remove the :hover css there is no problem. I am wondering is this h

  • Jquery Dropdown Menu: Menu lays BELOW div (can't 'mouse on top') 2012-01-13

    I'm using drop down menu with structure such as below, with combination of CSS and jQuery to hide/display the Sub Items. <li class="dropdown"><a href="#"><span>Folder 0</span></a> <ul> <li><a href="#">S

  • JQuery dropdown menu, how to show child-items when these are active? 2012-02-13

    I'm using jquery to animate a dropdown menu. The children of a menu-item are shown when hovering over the menu-item. Everything works, except for one thing: I want to show the children of the parent-menu-item when the visitor is a) on the current par

  • How to delay hiding of a menu with Jquery Dropdown Menu? 2010-06-03

    I have a dropdown menu that works fine, but I would like it so, that if I hover off the menu, it doesn't immediately hide again. So basically I would like a one second delay. I have read about setTimeout, but not sure if it is what I need? $('#mainna

  • Jquery Dropdown Menu - Keep parent tab active? 2011-01-03

    I have created a simple dropdown menu using JQuery, how would I go about keeping the parent tab active until I mouseout from the sub menu(s) / parent tab? $('#main-nav a').bind('mouseover', function() { $(this).parents('li').children('ul').show(); if

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.144 (s). 11 q(s)