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.
$(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。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.