Basic Touch enabled jQuery Scroller Plugin cSlider - Download Basic Touch-enabled jQuery Scroller Plugin - cSlider

Download Basic Touch-enabled jQuery Scroller Plugin – cSlider

Posted on

This time I will share jQuery Plugin and tutorial about Basic Touch-enabled jQuery Scroller Plugin – cSlider, hope it will help you in programming stack.

Basic Touch enabled jQuery Scroller Plugin cSlider - Download Basic Touch-enabled jQuery Scroller Plugin - cSlider
File Size: 6.97 KB
Views Total: 2090
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

cSlider is a small and easy-to-use jQuery plugin used to scroll horizontally through a list of html content with support for arrows navigation and drag / touch swipe events.

Dependencies:

  • jQuery
  • jQuery UI – For mouse drag support
  • jQuery UI Touch Punch – For touch swipe support

How to use it:

1. Load the jQuery cSlider plugin’s stylesheet file in the head section for basic scroller styles.

1 <link rel="stylesheet" href="css/cSlider.css">

2. Add a list of html content to the scroller.

01 <ul class="scroller">
02   <li class="scroller-slide">
03     Content 1
04   </li>
05  
06   <li class="scroller-slide">
07     Content 2
08   </li>
09  
10   <li class="scroller-slide">
11     Content 3
12   </li>
13 </ul>

3. Load jQuery library the jQuery cSlider plugin’s script at the bottom of the webpage.

1 <script src="jquery.min.js"></script>
2 <script src="js/cSlider.js"></script>

4. Load the other required resources for mouse drag and touch swipe support.

1 <script src="jquery-ui.min.js"></script>
2 <script src="touch-punch.js"></script>

5. Initialize the scroller.

1 $('.scroller').cSlider();

6. Default configuration options.

01 // animation options
02 slideDuration: '3000',
03 speed: 500,
04  
05 // custom next / prev arrows
06 nextArrow: '<button class="cSlider-arrow cSlider-arrow-next"></button>',
07 prevArrow: '<button class="cSlider-arrow cSlider-arrow-prev"></button>',
08  
09 // offset percentage
10 offsetPercent: .7

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

source : jqueryscript.net