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

Scrolling to next div with jQuery

Hi guys! How would i scroll to the next div with a slight transition similar to this: http://www.dishoom.com

Thanks in advance!

Shaun

I lasted about 10 seconds on that site before I got fed up. It's kind of a nifty scroll method they're using, but God is it annoying. You don't want anyone to scroll a bit and then be forced back to the content they were trying to get away from, right? Go with Richard Ling's suggestion of fullPage.js if you want something very nifty. It is a great plugin and will not make any users that visit your site want to find your cafe in London and shove your coffee down your throat! Lol! :D

1 Answer

Richard Ling
Richard Ling
8,522 Points

Hi Shaun,

There are quite a few different jQuery plugins and components out there to achieve this sort of effect with very little work.

Full page style scrolling from this one:

http://alvarotrigo.com/blog/fullpage-jquery-plugin-for-fullscreen-scrolling-websites/

Or a number of other "scroll-to" style plugins with different transitions and easing options:

http://balupton.github.io/jquery-scrollto/

http://lions-mark.com/jquery/scrollTo/

http://demos.flesler.com/jquery/scrollTo/

Apologies if this isn't quite what you're looking for

Thanks, Rich