This time I will share jQuery Plugin and tutorial about Custom Smooth Scroll Behavior For Browsers – scrollSpeed, hope it will help you in programming stack.
scrollSpeed is a small and easy-to-use jQuery plugin which applies the smooth scroll functionality with custom speed & easing to native browser scroll behavior.
The plugin will be disabled on Internet Explore and MS Edge for performance.
How to use it:
1. Insert the latest version of jQuery library and the scrollSpeed plugin into the document.
2 |
integrity = "sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" |
3 |
crossorigin = "anonymous" > |
5 |
< script src = "jQuery.scrollSpeed.js" ></ script > |
2. Include the jQuery easing plugin for extra easing functions (OPTIONAL).
2 |
integrity = "sha384-mE6eXfrb8jxl0rzJDBRanYqgBxtJ6Unn4/1F7q4xRRyIw7Vdg9jP4ycT7x1iVsgb" |
3 |
crossorigin = "anonymous" > |
3. Initialize the plugin and specify the step size (pixels) and scrolling speed (milliseconds).
4 |
jQuery.scrollSpeed(100, 800); |
4. Add an easing function to the smooth scroll behavior.
4 |
jQuery.scrollSpeed(100, 800, 'easeInOutBack' ); |
This awesome jQuery plugin is developed by aslamanver. For more Advanced Usages, please check the demo page or visit the official website.