gpt4 book ai didi

javascript - Ipad 上的 jQuery 鼠标悬停

转载 作者:行者123 更新时间:2023-11-28 20:24:49 30 4
gpt4 key购买 nike

我使用 Bootstrap 编写了一个响应式网站,并在桌面上的图像上使用 jQuery 进行了鼠标悬停,但在 iPad 上,当我单击这些图像时,我的功能 Mouseover 可以工作,因此存在错误。

我希望在我的 iPad 网站中无法启动此功能。我该怎么做?

这是我的代码:

  $('.image a img').mouseover(function(){
$(this).next().fadeIn();
});

$('.texte').mouseout(function(){
$(this).fadeOut();
});

最佳答案

也许尝试一下 question 中找到的答案

if(!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)) {
$('.image a img').mouseover(function(){
$(this).next().fadeIn();
});

$('.texte').mouseout(function(){
$(this).fadeOut();
});
}

关于javascript - Ipad 上的 jQuery 鼠标悬停,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17587219/

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