JQuery Slideup/Slidedown a div only after previous div animation or after delay

Currently I have a JQuery script in place http://jsfiddle.net/gaby/zzj7E/5/ which handles the requirement that when i hover on a particular div, a hidden div slides down. This happens on every div i hover on. However you will notice that if one hovers his mouse quickly over the set of divs, it leaves several divs sliding down at once. Actually i dont want this. What i want is that unless the previous div hasnt fully slided up the other div wont slide down even if hovered on. Or if possible show the div slide down effect only if the user has the mouse hover it for above 1.5 secs. Is this possible to implemented in jQuery? Can someone help? **EDIT:** Had to use .live() to add the effect to dynamically added elements. COuld nt use hover with live() as its proving cumbersome. Below is the code am using $(".altbgcolor").live('mouseenter', function() { //hover code $(this) .addClass('altbgcolor-active') .find(".sharedp") .slideDown('slow'); }).live('mouseleave', function() { //stopped hovering code $(this) .removeClass('altbgcolor-active') .find(".sharedp") .slideUp('slow'); }); How to integrate the effect in this mouseenter and mouseleave events?

以上就是JQuery Slideup/Slidedown a div only after previous div animation or after delay的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏