$('.xx').mouseenter(function(){
if($(this).is(':hover'))
alert('d');
else
alert('f');
});
这是我的代码,它应该提醒“d”,但每次它都会提醒“f” 这里有什么错误
最佳答案
function idIsHovered(id){
return $("#" + id + ":hover").length > 0;
}
关于Jquery 条件检查是 (':hover' )不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8010267/