[英]JQuery - Works in Firefox, but not in Safari, Chrome, or Mobile
I am using the following code. 我正在使用以下代码。 It works wonderfully in Firefox, but I can't seem to get it to work on any other browsers.
它在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')。animate尝试使用$('html,body')。animate。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.