87,923
社区成员
发帖
与我相关
我的任务
分享
var isRuning=false;
$("p.cp").mouseover(function() {
//增加一个判断
if(isRuning){
divHover.stop();
return;
}
divHover.show();
divHover.offset({
top: $(this).offset().top,
left: $(this).offset().left + $(this).width()
});
});
$("p.cp").mouseout(function(e) {
isRuning=true;//标记正在隐藏
e = e || window.event;
to = e.toElement || e.relatedTarget;
if (e == divHover) {
return false;
}
divHover.hide(1000,function(){isRuning=false;});//隐藏完毕后,改变变量
//$(this).removeClass("selected");
});