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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -