Smooth Scroll To Anchor Plugin With jQuery - smoothScroll.js

File Size: 6.59 KB
Views Total: 8167
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Smooth Scroll To Anchor Plugin With jQuery - smoothScroll.js

An easy and lightweight jQuery smooth scroll plugin which makes the internal anchors smoothly scroll the web page to a particular DIV (or any other point) within the document.

More features:

  • Configurable animation duration.
  • Optional easing functions.
  • Hashtag is supported as well.
  • Auto sets focus on the destination element.

Basic usage:

1. Create a normal anchor link pointing to a specific point of the web page.

<a href="#target">Goto</a>
<div id="target">Target</div>

2. Place both jQuery JavaScript library and the jQuery smoothScroll.js plugin at the end of the document.

<script src="" 
<script src="jquery.smoothscroll.js"></script>

3. Enable the plugin on the anchor link and done.

$(function() {

4. Set the duration of the scrolling animation.

  duration:  400

5. Apply an additional easing effect to the smooth scrolling. Requires jQuery UI or jQuery easing plugin.

<script src=""></script>
  easing: 'swing'

6. Add the target hash to the end of the URL.

  hash: true

7. Set the offset in pixels.

  offset: 0



  • v1.0.6

This awesome jQuery plugin is developed by ixkaito. For more Advanced Usages, please check the demo page or visit the official website.