This example demonstrates a vertical implementation of the YUI Slider Control. Some characteristics of this implementation include the following:
Pixel offset from start: 0
Calculated Value: 0
You supply your own markup for the slider. Keep in mind the following points about markup for YUI Slider Control implementations:
<img>element rather than a CSS background for the thumb to get around a performance bottleneck when animating the thumb's position in IE.
Offset values returned by the
getValue() methods, or passed as a parameter to the
change event callback, increase as the slider moves left-to-right and top-to-bottom. Making the value increase in the opposite direction is as simple as multiplying by -1.
Look for the magic in this code:
For horizontal Sliders, multiplying the offset by -1 makes values increase right-to-left.
Note: Logging and debugging is currently turned off for this example.
All YUI 2.x users should review the YUI 2.8.2 security bulletin, which discusses a vulnerability present in YUI 2.4.0-2.8.1.