Class: Slider

vef.ui.slider.Slider(target, options)

A Generic numeric slider Element. Events: * change * stop * slide

Constructor

new Slider(target, options)


options = {
    handles: 1  // amount of handles (1 or 2)
    min: 0      // minimum slider value
    max: 1      // maximums slider values
    value: 0    // initial numeric slider value or an Object
                // containing the properties "left" and "right"
    collision:  "stop"  // collision mode of handles
                // stop - handles collide and stop (default)
                // push - moving a handle pushes the other one
                // none - no collision
    orientation: "horizontal"  // "horizontal" or "vertical"
    // event listeners
    stop: function
    change: function
    slide: function
}
Parameters:
Name Type Description
target string | HTMLElement target DOM id or HTMLElement
options object
Author:
Source:

Methods

getValue()

Return the current value of the slider handle. returns an Object with properties "left" and "right" if the slider has two handles
Source:

setHandles(num)

Set the number of handles and reinitialize the handle
Parameters:
Name Type Description
num *
Source:

setMinMax(min, max)

Update the min max of the slider
Parameters:
Name Type Description
min number
max number
Source:

setValue(value)

Update the current value of the slider handle. For sliders with two handles {@code value} has to be an Object with the properties {@code left} and {@code right}
Parameters:
Name Type Description
value number | object
Source:

Documentation generated by JSDoc 4.0.4 on Thu Apr 24 2025 11:26:09 GMT+0000 (Coordinated Universal Time)