我最近添加了一个javascript,可以为常见问题解答页面提供折叠功能 我的页面也是使用 javascript 的滚动页面 但问题是当崩溃的javascript运行时 ex:click on question and answer appears 页面卡住,我无法再滚动我不知道为什么
这是网站http://sheetmulching.com/sr/examples/backgroundsFixed.html
这是javascript
jQuery(document).ready(function () {
$('.togglefaq').click(function(e) {
e.preventDefault();
var notthis = $('.active').not(this);
notthis.find('.icon-remove ').addClass('icon-plus').removeClass('icon-remove ');
notthis.toggleClass('active').next('.faqanswer').slideToggle(300);
$(this).toggleClass('active').next().slideToggle("fast");
$(this).children('i').toggleClass('icon-plus icon-remove ');
});
})
滚动卡住的解决方案是什么?
最佳答案
显然你的 scrolloverflow.js 文件有问题 - 当你执行它停止运行的函数时,它与更改 css 无关,我检查过。所以也许你应该从这里开始。
关于javascript - div更新时页面卡住,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42403365/