Answer the question
In order to leave comments, you need to log in
How to scroll to the desired block using the fullpage.js plugin and slimscroll?
It's happening here.
colorbar.acspro.ru
I use the fullpage.js plugin
In conjunction with the SlimScroll plugin
The first 3 blocks are FullScreen. In the latter, SlimScroll rises.
In the First block, I have a menu (icon in the upper right corner). It has an item Contacts which refers to id="screen-contacts" So. I've been trying to scroll to the right block for a week now. Tried many options but lacks knowledge and experience. Dear gurus, please tell me how to do it.
Answer the question
In order to leave comments, you need to log in
Who cares about my crutches
for Fullpage.js, I do this
afterLoad: function(anchorLink, index) {
if(index == '4'){
if(window.ContactFlag==true)
$("#products-screens .fp-scrollable").animate({ scrollTop: $('#screen-contacts').position().top }, 600)
window.ContactFlag=false
}
}
window.ContactFlag=false;
$(document).on('click','.nav-link-contacts',function(event){
event.preventDefault()
window.ContactFlag=true
$.fn.fullpage.moveTo($(this).data('link'), 0)
return false
})
$(document).on('click',".footer-link",function(eventObject) {
$("#products-screens .fp-scrollable").animate({ scrollTop: $('#screen-contacts').position().top }, 600);
event.preventDefault()
$("#products-screens .fp-scrollable").animate({ scrollTop: $('#screen-contacts').position().top }, 600);
return false;
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question