javascript - Foundation 6 Slider using disabled with a set value -


i have been racking brain trying figure 1 out. have large amount of these bars through out site. of bars show default value can not changed. site running foundation 5 , bars work fine when converting 6 system fails. following code default sample displays initial value.

<div class="slider" data-slider data-initial-start="50" data-end="200">   <span class="slider-handle"  data-slider-handle role="slider" tabindex="1"></span>   <span class="slider-fill" data-slider-fill></span>   <input type="hidden"> </div> 

now take code , add disabled class slider. when disables slider moves slider 0.

<div class="slider disabled" data-slider data-initial-start="50" data-end="200">   <span class="slider-handle"  data-slider-handle role="slider" tabindex="1"></span>   <span class="slider-fill" data-slider-fill></span>   <input type="hidden"> </div> 

has run issue , found solution. want lock value initial start value.

after testing think of , working many people came solution. looking answer please enjoy code below.

$('.sliderdisabled').on('moved.zf.slider',function(){     $(this).addclass('disabled'); }); 

simply add class sliderdisabled slider. code disable slider after bar handle moves.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -