Cross-page Smooth Scroll Plugin For jQuery - Smooziee.js

File Size: 1.85 MB
Views Total: 1015
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Cross-page Smooth Scroll Plugin For jQuery - Smooziee.js

Smooziee.js is a lightweight jQuery plugin to implement the high performant smooth scroll effect on your webpage/webapp. Not only anchor links within the document, the plugin also works on different pages within the same site. Hash tags (#link) is supported as well.

How to use it:

1. Add jQuery JavaScript library and the Smooziee.js script to the bottom of the webpage.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="dist/smooziee.js"></script>

2. Initialize the plugin and the Smooziee.js is ready for use.

$(function(){
  $.smooziee();
});

3. The plugin will automatically works on all anchor links within the document.

<a href="#bottom" id="top">Goto Bottom</a>
  ...
<a href="#top" id="bottom">Back To Top</a>

4. Sometimes you might need to exclude some anchor links within the document.

<a href="#" class="no-scroll">Exclude Link</a>

5. All possible plugin configuration options.

$(function(){

  $.smooziee({

    // ignore class
    ignore: '.no-scroll',

    // offset in pixels
    offset: -24, 

    // allows to smoothly scroll to other pages
    otherPageScroll: true, 

    // default scroll key
    scrollKey: 'scroll_id', 

    // animation speed in milliseconds
    speed: 1000,

    // replace or push
    urlHistory: 'replace',

    // URL parameter
    urlParam: 'hash'

  });
  
});

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