Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Marius Serban
Marius Serban
7,115 Points

Smooth Scrolling

Hey guys,

Can anyone help me to figure out how these guys (http://www.vacationequalityproject.com/) made their website to scroll, not smooth, but INCREDIBLE smooth? They also almost have like an inertia type effect...

Thank you in advance!!

2 Answers

Chris Shaw
Chris Shaw
26,676 Points

Hi Marlus,

They have built their own custom framework to control the scrolling on the page, in a nutshell they have bound events to the scrollwheel, scrollbar and touch events then they use the translateY function for the transform property which creates an hardware accelerated scroll effect but in the end it's all faked.

These types of effects are sort of frowned upon in the community as they have well known performance issues not to mention the amount of cross browser bugs that pop up because of them but in the end they create something truly unique and eloquent but a pain in the rear to build.

Marius Serban
Marius Serban
7,115 Points

Hey Chris,

Thanks for taking time to answer to my question. See, I'm just a web DESIGNER, with my background in graphic design, so I don't know exactly what's in the back, but I like the way it works in the front :)

Would you be available for a gig? :) Email me at mario.print@gmail.com if you think you can replicate that exact effect on the website I'm building :)

Chris Shaw
Chris Shaw
26,676 Points

While I would like to say yes I'm already committed to two personal projects in the middle of a full time job so I can't, I wish you luck on your journey though.

Marius Serban
Marius Serban
7,115 Points

Thanks Chris! Even though your answer was a no, I really appreciate your honesty, and the fact that you know and you are focused on your priorities. I wish I could say no more often as well :)