javascript - Jquery: Range Slider: How to get the set range values? -


i want set range values using $_post after form submit. problem when range set 10 - 25, value 10 value got.

if(isset($_post['btn_submit'])) {    $value = $_post['get'];    echo "<script> alert($value) </script>"; }  <form method="post">     <input class="range-slider" type="hidden" name="get"/>     <input type="submit" value="submit" name="btn_submit"> </form>    $(document).ready(function(){     $('.single-slider').jrange({         from: -2.0,         to: 2.0,         step: 0.5,         scale: [-2.0,-1.0,0.0,1.0,2.0],         format: '%s',         width: 300,         showlabels: true,         snap: true     });      $('.range-slider').jrange({         from: 0,         to: 100,         step: 1,         scale: [0,25,50,75,100],         format: '%s',         width: 300,         showlabels: true,         isrange : true     }); }); 

make sure have isrange: true in slider. mentioned in docs:

isrange : true if range selector. if range value of hidden input set comma-seperated, e.g., "25,75"

you should 2 values if isrange set true.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -