jQuery Plugin Drag To Scroll dragScroll - Download jQuery Plugin For Drag To Scroll Functionality - dragScroll

Download jQuery Plugin For Drag To Scroll Functionality – dragScroll

Posted on

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.

jQuery Plugin Drag To Scroll dragScroll - Download jQuery Plugin For Drag To Scroll Functionality - dragScroll

File Size: 4.18 KB
Views Total: 5252
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

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">
03     <div class="wrapper">
04       <div> 1 </div>
05       <div> 2 </div>
06       <div> 3 </div>
07       <div> 4 </div>
08       <div> 5 </div>
09       <div> 6 </div>
10       <div> 7 </div>
11       <div> 8 </div>
12       <div> 9 </div>
13       <div> 10 </div>
14       ...
15       <div> n </div>
16     </div>
17   </div>
18 </div>

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">
4 </script>
5 <script src="dragScroll.js"></script>

3. Enable the drag to scroll functionality on the container.

1 var $container = $(".container");
2 var $scroller = $(".scroller");
3  
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.

source : jqueryscript.net