jQuery Plugin To Create Scroll To Top Elements - toTop

File Size: 6.23 KB
Views Total: 581
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
jQuery Plugin To Create Scroll To Top Elements - toTop

toTop is a simple, lightweight yet highly configurable jQuery plugin which enables you to attach the familiar smooth scroll back to top functionality to any DOM element as you want.

How to use it:

1. Include jQuery JavaScript library and the jQuery toTop plugin on the web page.

<script src="jquery-1.11.3.min.js"></script>
<script src="jquery.toTop.js"></script>

2. Create a scroll back to top link.

<a class="to-top">
  Back To Top

3. Call the plugin with default options.


4. Customize the scroll back to top behavior.

// auto hide when reaches the page's top
autohide: true,

// Scrolling length from top to hide automatically.
offset: 420,

// The duration for scroll and fade speed.
speed: 500,

// You can add custom position in css. 
position: true,

// right position
right: 15,

// bottom postion
bottom: 30

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