我有一个鼠标移入移出显示隐藏的事件,但是鼠标如果多次滑过就会执行多次,如何在鼠标移出事件执行完毕后立刻停止事件?
$(".target").on('mouseenter',function() {
$(this).children('.p1').show(function(){
$(this).addClass('animated fadeInLeft');
$(this).removeClass('animated fadeInLeft');
})
});
$(".target").on('mouseleave',function() {
$(this).children('.p1').hide(function(){
$(this).addClass('animated fadeOutLeft');
$(this).removeClass('animated fadeOutLeft');
})
});
倚天杖
相关分类