this question has answer here:
- slide down , delay in jquery 3 answers
i tried using settimeout broke things. here code:
$(document).ready(function() { $('.menu-item-has-children').hover( function() { $(this).children('.sub-menu').slidedown(400); }, function() { $(this).children('.sub-menu').slideup(400); } ); }); // end ready
i'd 1 second pause before .slideup. help?
you can use delay
:
set timer delay execution of subsequent items in queue.
$(document).ready(function() { $('.menu-item-has-children').hover( function() { $(this).children('.sub-menu').delay(1000).slidedown(400); }, function() { $(this).children('.sub-menu').delay(1000).slideup(400); } ); }); // end ready
Comments
Post a Comment