YUI recommends YUI3.
YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.
This documentation is no longer maintained.
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.relative
or absolute
.CSS:
Markup:
getValue
offsetOffset 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.
Copyright © 2013 Yahoo! Inc. All rights reserved.