draggable touchable numeric slider - Free Download Draggable & Touchable Numeric Slider In jQuery

Free Download Draggable & Touchable Numeric Slider In jQuery

Posted on

This time I will share jQuery Plugin and tutorial about Draggable & Touchable Numeric Slider In jQuery, hope it will help you in programming stack.

draggable touchable numeric slider - Free Download Draggable & Touchable Numeric Slider In jQuery
File Size: 17.5 KB
Views Total: 1012
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A simple, powerful, customizable and touch-enabled jQuery numeric slider plugin for selecting numerical values by clicking/tapping and dragging the slider thumb.

How to use it:

1. Load the jquery-slider-min.js script after loading jQuery library.

1 <script src="/path/to/cdn/jquery.min.js"></script>
2 <script src="/path/to/jquery-slider-min.js"></script>

2. Load jQuery Mobile library for touch support.

1 <script src="/path/to/cdn/jquery.mobile.min.js"></script>

3. Create a basic numeric slider using the data-slider-box attribute:

1 <div data-slider-box></div>

4. Or initialize the plugin via JavaScript:

1 <div class="example"></div>
1 $(function(){
2   $('.example').createSlide();
3 });

5. Determine the max value. Ideal for a range slider. Default: 100.

1 $('.example').createSlide({
2   maxvalue: 10
3 });

6. Determine the width of the numeric slider. Default: width of of its parent container.

1 $('.example').createSlide({
2   width: 250
3 });

7. Determine the step size. Default: 1.

1 $('.example').createSlide({
2   interval: 5
3 });

8. Output the numeric value in a container.

1 <div class="output"></div>
1 $('.example').createSlide({
2   output: '.output'
3 });

9. Customize the progress bar that fills all the space left to the thumb.

1 $('.example').createSlide({
2   progress: true
3 });
1 .progress {
2   width: 0px;
3   background-color: #222;
4 }

10. Customize the initial text to be displayed on the slider thumb.

1 $('.example').createSlide({
2   firstvalue: 'Hey'
3 });

11. Customize the styles of the slider thumb.

1 $('.example').createSlide({
2   firstvalue: 'Hey'
3 });