gpt4 book ai didi

Jquery 条件检查是 (':hover' )不起作用

转载 作者:行者123 更新时间:2023-12-03 22:16:03 24 4
gpt4 key购买 nike

$('.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/

关于Jquery 条件检查是 (':hover' )不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8010267/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com