A jQuery plugin that makes it easy to transform any html-element into a range slider with definable range that is consistent across browsers.
npm install @vdt-jquery/jquery-rangeslider
`
Html:
`
`
Javascript:
`
$('#example-slider').rangeslider();
`
This will generate a rangeslider with a range of 0 to 200 with steps of 5 and a starting value of 25.
The input field will have the value mentioned in the data-value attribute and the name "example-value".
Styling
The rangeslider only provides very basic styling in the provided style sheet jquery-rangeslider.style.css; you can use this as a template to create your own style.
The various css classes the slider uses are:
* .rangeslider is the original element and the main container of the slider
* .rangeslider-input is the hidden input field that contains the current value
* .rangeslider-thumb is the element that can be dragged along the track
* .rangeslider-track` is the track along which the thumb is dragged