Answer the question
In order to leave comments, you need to log in
How to make a smooth transition between normal and page scroll sections in fullpage.js?
Hello!
I'm working on the site and ran into a problem, the site provides a combined scroll - in sections and a normal one.
I do the following to switch from page scrolling to normal scrolling:
setTimeout(function () {
fullpage_api.setAutoScrolling(false);
}, 1000); // ждем когда перейдет на следующую секцию и отключаем автоскролл
var sectionPosition = $('#slide7').offset().top; //считаем расстояние от верха страницы до секции с постраничной прокруткой
$('body, html').animate({
scrollTop: sectionPosition // прокручиваем к секции
}, 600, function () {
setTimeout(function () {
fullpage_api.setAutoScrolling(true); //включаем постраничный скролл
}, 100);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question