This repository was archived by the owner on Dec 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Options
Karl edited this page Aug 14, 2018
·
13 revisions
A Rangeable
instance can be initialised with a number of custom options.
Just pass an Object
to the constructor
with your options:
const rangeable = new Rangeable(input, {
type: "single",
tooltips: "always",
min: 0,
max: 100,
step: 1,
value: 50,
vertical: false,
controls: undefined,
formalTooltip: function(val) {
// format the tooltip content
},
onInit: function(val) {
// do something when the instance has loaded
},
onStart: function(val) {
// do something on mousedown/touchstart
},
onChange: function(val) {
// do something when the value changes
},
onEnd: function(val) {
// do something on mouseup/touchend
}
});