html - Submenu setup with jquery and effect 'fold' -
html - Submenu setup with jquery and effect 'fold' -
i want open submenu jquery effect fold, problem if user "hover effect" fast menu remain open, how can avoid this, jquery code is:
$('ul.mainmenu li').hover( function() { $(this).children('ul').show('fold', 570); }, function() { $(this).children('ul').hide('fold', 500); } );
my jsfiddle link is: http://jsfiddle.net/9wkbf/
updated fiddle
the reason behind problem is, first event $(this).children('ul').show('fold', 570);
queued , until completes, sec animation not start.
the next snippet can workaround
$('ul.mainmenu > li').hover( function() { $(this).children('ul').show('fold', 570); }, function() { $('ul:not(.mainmenu)').hide('fold', 500); } );
*important note : work current scenario.
jquery html css
Comments
Post a Comment