🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Scroller.js is a jQuery plugin to create anchor links which scroll the webpage to desired content section smoothly.

smooth-scroll scrolling One-Page-Scrolling scroll-to

Documentation

jQuery Scroller

A jQuery plugin that scrolls to an element. It is simple to setup. It can be added to any existing page without the need to change the HTML mark up.

A. Install

  1. Include a jQuery core library in your html. For example, use this cdn:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

By default, Scroller needs also the jQuery easing.

For example, use this cdn:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
  1. Download the Scroller library, and include dist/jquery.scroller.min.js in your html. For example:
<script src="asset/raphhh/jquery-scroller/dist/jquery.scroller.min.js"></script>
  1. Call the scroller plugin for all the anchors from which you want to scroll. For example:
<script>     $(function(){         $('a').scroller();     }); </script>

Note that the anchors must specify in their href attribute the id of the element to scroll to.

B. Options

$.fn.scroller accepts all the options of jQuery animate. See the jQuery documentation.


You May Also Like