This is a migrated thread and some comments may be shown as answers.

Color and thickness

2 Answers 141 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Louis
Top achievements
Rank 1
Iron
Iron
Iron
Louis asked on 07 Jan 2017, 03:53 PM

Hello,

1) How I can change the color slider when user select another value of the slide.  Example, selecting 1 the slider become yellow, selecting 2 it's become red, etc.  I have to use the sliderChange I guess.  But what are the JS instructions?

2)  And it's possible the change the thickness of the slider?

 

Thank a lot for your precious help.

2 Answers, 1 is accepted

Sort by
0
Eduardo Serra
Telerik team
answered on 09 Jan 2017, 09:15 PM
Hello Louis,

The color of the slider can be changed using the following using CSS, and we can dinamically change it, when the change event is triggered, using jQuery like this:

$(".k-slider-track", top).css("background-color", "#00ff00");
$(".k-slider-selection", top).css("background-color", "#00ff00");

I have prepared a sample in the Kendo UI Dojo that demonstrates this approach; you can take a look at it here.

Regarding your second question, there is no support for changing the width of our Kendo UI Slider; I encourage you to participate in the Kendo UI Feedback and Feature Request Portal and, if enough people vote on your request, developers might include it in future releases of Kendo UI Professional.

I hope this helps!

Regards,
Eduardo Serra
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Louis
Top achievements
Rank 1
Iron
Iron
Iron
answered on 09 Jan 2017, 10:11 PM

A BIG THANK YOU Eduardo .

 

This information really help me.  Happy new year to you and all the telerik members.

Tags
Slider
Asked by
Louis
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Eduardo Serra
Telerik team
Louis
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or