Basic Smooth Scroll Plugin with jQuery - scrollit.js
File Size: | 64.2 KB |
---|---|
Views Total: | 1677 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
scrollit.js is a very simple jQuery script that smoothly scrolls to a target. It increases user experience and makes your website a little bit nicer. Beside jquey you additionally need jQuery UI for easing effects. scrollit.js is easy to use and works almost out of the box.
How to use it:
1. Load jQuery library and the jQuery scrollit.js into the document.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script src="js/scrollit.js"></script>
2. Load jQuery UI for extra easing effects.
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
3. Integrate scrollit.js
function scrollIt(element, easing, offset, callback) { $('html, body').animate({ scrollTop: ($(element).offset().top) + offset}, 1500, easing); if(callback && (typeof(callback) === "function") ) { callback(); } }
This awesome jQuery plugin is developed by umbertino. For more Advanced Usages, please check the demo page or visit the official website.