abpetkov / powerange

iOS 7 style range slider
http://abpetkov.github.io/powerange/
423 stars 85 forks source link

How to reset at start value #10

Open ashishkhare250 opened 10 years ago

ashishkhare250 commented 10 years ago

Hi.. how can i reset slider value at start value.

sakhil commented 9 years ago

I have the same issue , do we have a solution for the same ?

ghost commented 9 years ago

You could effect the .range-quantity && .range-handle in the jquery

$('FOO-BUTTON_TO_RESET').click(function(){ $('.range-quantity').css({width:0}); $('.range-handle').css({left:0}); }

Its dirty but it will work for just a simple reset

Insider77 commented 9 years ago

I did it like this: // initialize var changeInput = document.querySelector('.rangeSlider'); var init = new Powerange(changeInput, { min: 50, max: 150, start: 100, step: 1, hideRange: true });

// and when I need to reset init.setStart(100);