[slider] How to change slider color?

[slider] How to change slider color?

Hello guys,

I have to change the slider color depending on its value, but I didn't manage to do it, I changed the attribute "background" of the class "ui-slider-range" this way :

$("#slider.ui-slider-range").css("background","red");

Since I have three states (red, orange and green) I have to use three sliders, each one has one color, all hidden at the beginning then I show the appropriate slider when the value changes.

Thanks for your help,

Best regards,