Explore the community Forums Lectora Lectora Questions & Answers Scrollbar fill on scrolling page Reply To: Scrollbar fill on scrolling page

#441600 Score: 0
Profile photo of George Bosveld
George Bosveld
Member
beginner
intermediate
friend finder
advanced
curious george
contributor
wise owl
picture perfect
profile
1 pt
@GeorgeB

Seems it only works if I don’t load jQuery via a html extension.

I have a little code that scrolls to the top (we use long pages):

function STT() {
$(‘html, body’).animate({scrollTop: $(‘#pageDIV’).offset().top -50 }, ‘slow’);
}

Now that obviously doesn’t work anymore. You have any idea how comes that loading jQuery doesn’t let the scrollbar code work?

This code works for most modern browsers and is a fix for now:

window.scroll({ top: 0, left: 0, behavior: ‘smooth’ });

Wonder still though if you know a solution wiht jQuery loaded and the old code 🙂

 

Kind regards,

George