Loading jQuery UI Slider All Selected Range (Not Only Min & Max) To an Array
Can you please take a look at this
Demo and let me know how I can
load the selected range values between Min and Max into an array?
the
selected.push(ui.values);
is giving me the Min and Max of selected which is Ok but I also need the values between too
- $( function() {
- var selected =[];
- $( "#slider-range" ).slider({
- range: true,
- min: 133,
- max: 146,
- values: [ 133, 146 ],
- stop: function( event, ui ) {
- $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
-
- $("#dl-sv-input-mmr").val(ui.values[0] + " - " + ui.values[1]);
- selected.push(ui.values);
- console.log(selected)
- },
-
- });
- $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) +
- " - $" + $( "#slider-range" ).slider( "values", 1 ) );
- } );