Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Jeremy Coleman
Jeremy Coleman
5,449 Points

Smooth MouseWheel Scroll

I have been researching this for hours and I am getting no where. However I am working on a project and would like to making scrolling smooth with a little ease. (Ease as in it continues to scroll for about half a second and stops.)

To be clear, I am not looking to click a anchor tag so the website scrolls towards the target, I am wanting to scroll up or down with a smooth "feel" so elements and animations that are effected by scrolling transition smoothly as well.

I have searched through Google and YouTube and on here so it could be possible I am looking up the wrong thing.

Thanks in advance for your replies!

2 Answers

Jeremy Coleman
Jeremy Coleman
5,449 Points

Very useful website, love all the tuts however can't find what I am looking for. My goal is to get chrome to not jerk while scrolling up or down with the mouse wheel. Apologies!!

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,624 Points

I'm not sure it's a problem with anything other that the browser's loading speed (and what it's refreshing) and the amount of CPU usage at the moment that you are scrolling.

There are many times, on various websites (Treehouse included) where my scrolling is 'jerky.' Sometimes it's really bad, other times just a little. Consequently, on these same websites, there are many (in fact most) times the scrolling is fine and smooth.

When the 'jerky' movements get really bad, I usually (log out) quit the browser and relaunch. Many times this solves the problem, but if I've been running multiple (high load) programs at once for a while, then the only fix is usually restarting my computer.

I find I run into this problem more so on my older laptop but not so much on my newer desktop (both Macs).

If you find this problem is ALL the time and on EVERY device, then I'm not sure what it could be.

Hope you solve this. Jason

Jeremy Coleman
Jeremy Coleman
5,449 Points

Thanks Jason, some websites load smoother then others for me. The project I am working on now doesn't have much content so as far as memory goes I don't think that's the problem. But what I did notice that FF scrolls smoother then Chrome