This time I will share jQuery Plugin and tutorial about jQuery Plugin For Drag To Scroll Functionality – dragScroll, hope it will help you in programming stack.
dragScroll is a dead simple jQuery plugin which enables the panning (drag to scroll) functionality on your scrollable container.
How to use it:
1. Create a scrollable container as follows:
01 |
< div class = "container" > |
02 |
< div class = "scroller" > |
2. Put jQuery JavaScript library and the jQuery dragScroll plugin’s script at the end of the document.
2 |
integrity = "sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" |
3 |
crossorigin = "anonymous" > |
5 |
< script src = "dragScroll.js" ></ script > |
3. Enable the drag to scroll functionality on the container.
1 |
var $container = $( ".container" ); |
2 |
var $scroller = $( ".scroller" ); |
4 |
bindDragScroll($container, $scroller); |
This awesome jQuery plugin is developed by Pong420. For more Advanced Usages, please check the demo page or visit the official website.