I am using two jquery sliders, one with single and another multi handle. It's working okay but I need to show the selected range in a different colour and am unable to find the same in the documentation.
This is how my script looks like:
$(function() {
$( "#slider-1" ).slider({
slide: function(event, ui) {
$(this).css({
'background': 'rgb(107, 183, 185)'
});
}
});
});
This script does give the background color but to the full slider which is not what I want. I need to change the color for only the selected range.
This is how it looks with the current script:
This is what I am looking for:
And for the double handle range selector, this is the script from jquery UI that I am using:
$(function() {
$( "#slider-3" ).slider({
range:true,
min: 0,
max: 500,
values: [ 35, 200 ],
slide: function( event, ui ) {
$( "#price" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
}
});
$( "#price" ).val( "$" + $( "#slider-3" ).slider( "values", 0 ) +
" - $" + $( "#slider-3" ).slider( "values", 1 ) );
});
This one gives me the result as follows: (I am unable to change the color here)