Smooth Page Scrolling Plugin With jQuery smoothPageScroll - Download Smooth Page Scrolling Plugin With jQuery - smoothPageScroll

Download Smooth Page Scrolling Plugin With jQuery – smoothPageScroll

Posted on

This time I will share jQuery Plugin and tutorial about Smooth Page Scrolling Plugin With jQuery – smoothPageScroll, hope it will help you in programming stack.

Smooth Page Scrolling Plugin With jQuery smoothPageScroll - Download Smooth Page Scrolling Plugin With jQuery - smoothPageScroll
File Size: 95 KB
Views Total: 2624
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

smoothPageScroll is a lightweight jQuery one page scroll plugin which enables the anchor links to scroll the webpage to desired points smoothly. Supports horizontal, vertical and diagonal scrolling effects. Easing effects are supported as well.

How to use it:

1. Put jQuery library and the jQuery smoothPageScroll plugin’s script in the footer of the webpage.

1 <script src="//code.jquery.com/jquery-3.1.0.min.js"></script>
2 <script src="jquery.smoothPageScroll.js"></script>

2. Include the jQuery easing plugin for additional easing effects.

1 <script src="jquery.easing.1.3.min.js"></script>

3. Create an anchor link pointing a specific container where you want to scroll to.

1 <a href="#section">Link</a>
2  
3 <div id="section">
4   ...
5 </div>

4. Active the plugin with one JS call.

1 $('a[href^="#"]').smoothPageScroll();

5. Default config options.

01 $('a[href^="#"]').smoothPageScroll({
02  
03   // easing type
04   easing: 'easeOutQuart',
05  
06   // scrolling speed
07   speed: 1000,
08  
09   // scrolling delay
10   delay: 0,
11  
12   // specify the target container
13   target: undefined,
14  
15   // fired after the scroll is complete
16   complate: function (){},
17  
18   // add hash to url
19   isAddHash: true,
20  
21   // vertical scroll
22   isTopScroll: true,
23  
24   // horizontal scroll
25   isLeftScroll: true
26    
27 });

Change log:

2016-09-03

  • fix target to currentTarget

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

source : jqueryscript.net