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.
You can load the necessary JavaScript and CSS for this example from Yahoo's servers. Click here to load the YUI Dependency Configurator with all of this example's dependencies preconfigured.
Note: Logging and debugging is currently turned off for this example.
Copyright © 2011 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Copyright Policy - Job Openings