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

Ben Anggoro
Ben Anggoro
36,161 Points

Gem jQuery Smooth Scroll Easing Options

Hello all,

Wondering if anyone has ever experienced implementing smooth scroll for rails gem?

[jQuery Smooth Scroll Rails]('https://github.com/kswedberg/jquery-smooth-scroll')

How do I change the easing options? Do I need to include jquery-easing-rails as well?

Their readme on github only shows easing:"swing" which doesn't seem to do anything.

I also did try to include easing-rails gem and tried out the option easing:"easeInOutExpo" (my favorite), but nothing seems to be happening.

Has anyone ever experienced implementing different easing options on this gem?

Thanks in advance Ben

1 Answer

Jack Choi
Jack Choi
11,420 Points

I haven't used the gems to install them before but it's possible the easing function easeInOutExpo doesn't exist. You can check what is available by running this in the console:

$.easing

With jQuery core alone, only "linear" and "swing" is available. All the other easing functions require installing jquery-ui