A simple slider bar.
Its value can be moved with the mouse.
Silder use process
stylesheet. You need add slider
class and data-toggle="slider"
to the button
inner the div
.
<div class="progress"> <button type="button" class="btn btn-primary slider" data-toggle="slider"></button> </div>
Append the option name to data-
, as in data-min
.
Name | type | default | description |
---|---|---|---|
value | number | 0 | Set the default value. (Only enable via Javascript.) |
min | number | null | Set the minimun value of the slider. It will only work when max is also setted. |
max | number | null | Set the maximun value of the slider. It will only work when min is also setted. |
Event | Description |
---|---|
change |
It will trigger when change its value. You can get value through val() .
|
$("#element .slider").change(function(){ $(this).val(); });