Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SuperSlider(fieldName, sliderOptions, currentOption, element) {
- this.changeOptionTo = function(newOption){
- this.element.removeClassName('option' + newOption);
- this.element.addClassName('option' + newOption);
- this.currentOption = newOption;
- }
- range = $R(0, sliderOptions.size() - 1 );
- this.fieldName = fieldName;
- this.sliderOptions = sliderOptions;
- this.currentOption = currentOption;
- this.element = element;
- this.slider = new Control.Slider('handle-' + this.fieldName, 'slider-' + this.fieldName, {
- increment: 41,
- range: range,
- values: range.toArray(),
- onChange: function(value) {
- changeOptionTo(value);
- }
- });
- };
Add Comment
Please, Sign In to add comment