Guest User

Untitled

a guest
Jun 19th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. function SuperSlider(fieldName, sliderOptions, currentOption, element) {
  2. this.changeOptionTo = function(newOption){
  3. this.element.removeClassName('option' + newOption);
  4. this.element.addClassName('option' + newOption);
  5. this.currentOption = newOption;
  6. }
  7.  
  8. range = $R(0, sliderOptions.size() - 1 );
  9. this.fieldName = fieldName;
  10. this.sliderOptions = sliderOptions;
  11. this.currentOption = currentOption;
  12. this.element = element;
  13. this.slider = new Control.Slider('handle-' + this.fieldName, 'slider-' + this.fieldName, {
  14. increment: 41,
  15. range: range,
  16. values: range.toArray(),
  17. onChange: function(value) {
  18. changeOptionTo(value);
  19. }
  20. });
  21. };
Add Comment
Please, Sign In to add comment