jQuery - stopping a hover event while dragging

橙三吉。 提交于 2019-12-05 23:56:01

there are hundreds of ways.

    // Image actions menu
$('ul.imglist li').hover(
  function() { 
    $(this).find('ul')
      .css('display', 'none')
      .fadeIn('fast')
      .css('display', 'block');
  },
  function() { 
    $(this).find('ul')
      .fadeOut(100); 
  }); 

should be on mouseup event... then on mousedown even you can cancel the hover event. by the way look up binding and unbinding

but why not use the draggable ui ? and save yourself some time end effort

.hover-off {
  pointer-events: none;
}

...to the rescue: Paul Lewis + thecssninja.com w/ a pretty nice, 1-stop solution.

http://www.thecssninja.com/css/pointer-events-60fps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!