I am using the following code and I'm wondering how to get the min and max values from the slider to my lowCount and HighCount variables? Now it returns NaN.
function countDown() { $("#slider-range").slider({ range: true, min: 0, max: 60, values: [5, 15], slide: function(event, ui) { $("#amount").val(ui.values[0] + " Minutes - " + ui.values[1] + " Minutes"); } }); $("#amount").val($("#slider-range").slider("values", 0) + " Minutes - " + $("#slider-range").slider("values", 1) + " Minutes"); var lowCount = 60 * $("#slider-range").slider("values", 0); var highCount = 60 * $("#slider-range").slider("values", 1); return Math.floor(Math.random() * highCount) + lowCount; }
source share