JoeH Posted September 20, 2021 Share Posted September 20, 2021 I searched for this issue but could not find any mention of it, I've checked the Docs and I seem to be doing this correctly, however the window will not scroll with an easing, it just seems to use a default one which starts very slow then suddenly accelerates and stops suddenly. Here is my code: var thumbs = document.getElementsByClassName('col'); Array.prototype.forEach.call(thumbs, function(t) { t.addEventListener('click', function() { gsap.to(window, 0.6, {scrollTo: '#info-section', ease:"power2.inOut"}); }) }); I was thinking that maybe I hadn't included the EasePack or something so I tried to just animate a random element on the page to a Y value, and this worked with the easing I had declared it to use. Which makes me wonder if it is a problem with scrollTo? Link to comment Share on other sites More sharing options...
OSUblake Posted September 20, 2021 Share Posted September 20, 2021 Make sure you don't have smooth scroll behavior in your CSS. https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior If you need more help, please provide a minimal demo showing the issue. 2 2 Link to comment Share on other sites More sharing options...
JoeH Posted September 20, 2021 Author Share Posted September 20, 2021 Ahhh! That was it, just started using Bootstrap 5 which has this applied to :root by default. Thanks 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now