Slider Class

The jQuery UI Slider plugin makes selected elements into sliders. There are various options such as multiple handles, and ranges. The handle can be moved with the mouse or the arrow keys. All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'): ui.handle: DOMElement - the current focused handle ui.value: Integer - the current handle's value

Namespace: SharpKit.jQuery.UI.Controls

Constructors

Name Description
Slider(JsString, SliderOptions) Creates a new instance of Slider
Slider(JsString) Creates a new instance of Slider

Properties

Name Description
animate Whether to slide handle smoothly when user click outside handle on the bar. Default: false
change This event is triggered on slide stop, or if the value is changed programmatically (by the value method). Takes arguments event and ui. Use event.orginalEvent to detect whether the value changed by mouse, keyboard, or programmatically. Use ui.value (single-handled sliders) to obtain the value of the current handle, $(this).slider('values', index) to get another handle's value. Default: null
max The maximum value of the slider. Default: 100
min The minimum value of the slider. Default: 0
orientation Normally you don't need to set this option because the plugin detects the slider orientation automatically. If the orientation is not correctly detected you can set this option to 'horizontal' or 'vertical'. Default: 'auto'
range If set to true, the slider will detect if you have two handles and create a stylable range element between these two. Two other possible values are 'min' and 'max'. A min range goes from the slider min to one handle. A max range goes from one handle to the slider max. Default: false Types: Boolean, String
slide This event is triggered on every mouse move during slide. Use ui.value (single-handled sliders) to obtain the value of the current handle, $(..).slider('value', index) to get another handles' value. Return false in order to prevent a slide, based on ui.value. Default: null
start This event is triggered when the user starts sliding. Default: null
step Determines the size or amount of each interval or step the slider takes between min and max. The full specified value range of the slider (max - min) needs to be evenly divisible by the step. Default: 1
stop This event is triggered when the user stops sliding. Default: null
value Determines the value of the slider, if there's only one handle. If there is more than one handle, determines the value of the first handle. Default: 0
values This option can be used to specify multiple handles. If range is set to true, the length of 'values' should be 2. Default: null
© Copyright 2005-2011 SharpKit. All rights reserved.