$('.xx').mouseenter(function(){ if($(this).is(':hover')) alert('d'); else alert('f');}); 这是我的代码,它应该警告’d’,但每次它警告’f’ 什么错误在这里 function idIsHovered(id){ return $("#" + id + ":hover").lengt
$('.xx').mouseenter(function(){
if($(this).is(':hover'))
alert('d');
else
alert('f');
});
这是我的代码,它应该警告’d’,但每次它警告’f’
什么错误在这里
function idIsHovered(id){
return $("#" + id + ":hover").length > 0;
}
http://jsfiddle.net/mathheadinclouds/V342R/
