javascript - Get jQuery two-handle slider value -


i have following html , js structure using jquery two-handle range slider:

.html

<p>   <input class="amount" readonly style="border:0; color:black; background: transparent; text-align: center;" type="text"> </p> <div class="slider-range"></div> 

.js

$(function() {   $(".slider-range").slider({     range: true,     min: 0,     max: 1000,     values: [0, 1000],     slide: function(event, ui) {       $(".amount").val("$" + ui.values[0] + " - $" + ui.values[1]);     }   });   $(".amount").val("$" + $(".slider-range").slider("values", 0) +     " - $" + $(".slider-range").slider("values", 1)); }); 

i think need add value="..." <input> element, how capture value range 2 sliders according javascript code? !

the values can extracted as:

var minimum_val = $(".slider-range").slider("values",0) var maximum_val = $(".slider-range").slider("values",1) 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -