O'Reilly logo

HTML5 Boilerplate Web Development by Divya Manian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding smooth-scroll plugin and interaction

If you have not noticed it already, the website we are building is a single page site! All content that is required is found on the same page. The way our site is currently designed, it would mean clicking on one of the site navigation links would scroll roughly to the section that the navigation link refers to. We would like this interaction to be smooth. Let us use jQuery's smooth-scroll plugin to provide this.

Let us download the plugin file from the Github repository, hosted on github.com/kswedberg/jquery-smooth-scroll.

In it, we find a minimized version of the plugin (jquery.smooth-scroll.min.js) that we shall open in our text editor.

Then copy all the code and paste it within the plugins.js file. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required