gpt4 book ai didi

javascript - JQuery - 适用于 Firefox,但不适用于 Safari、Chrome 或 Mobile

转载 作者:行者123 更新时间:2023-12-03 09:23:49 25 4
gpt4 key购买 nike

我正在使用以下代码。它在 Firefox 中运行得非常好,但我似乎无法让它在任何其他浏览器上运行。

$(document).ready(function () {
$(".poem").click(function () {
$('.active').not(this).toggleClass('active').next('.showContent').slideToggle(300)
$(this).toggleClass('active').next().slideToggle("slow", function ()
$('html').animate({
scrollTop: $(this).offset().top - 25
}, "fast"));
});
});

最佳答案

尝试使用 $('html, body').animate 代替 $('html').animate。

关于javascript - JQuery - 适用于 Firefox,但不适用于 Safari、Chrome 或 Mobile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31749987/

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