USING SCROLLING TRANSITIONS WITH JQUERY

If your website uses any (<a href='#)topic'> Go To Topic</a> hash links tied to <h1 id= 'topic'>Topic Content</h1> markers on the same page, you can use jQuery and a plug-in called ScrollTo to provide a smooth-scrolling animation process.

Before you begin, your first option is to link directly to the jQuery ScrollTo plug-in from your web page, as described earlier in the chapter with the CDN method of jQuery itself, using http://flesler-plugins.googlecode.com/files/jquery.scrollTo-1.4.2.js.

Your second option is to download the plug-in file, place it on your web server, and load it directly:

<script src='jquery.scrollTo-1.4.2.js'></script>

After the file is imported, you can call the ScrollTo plug-in ...

Get HTML5: Your visual blueprint™ for designing rich web pages and applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.