I need to set using jquery the height property of range input. I came across a lot of answers that says that it is directly not possible, and you need to do a workaround , here is the link, or this link
CSS :
input[type="range"]::webkit-slider-thumb {
height : 15px;
}
The workaround proposed is to add another css class with new height for instance :
.newHeight::webkit-slider-thumb {
height : 45px;
}
and finally you can set the new height
by adding (or toggle) the new class :
JQuery :
$('html').addClass('newHeight');
This is working fine, but my problem is that the new height
should be variable in my case; I don't have the exact value, it is computed based on other parameters on page load. So is it possible to set in this case the height
of the slider-thumb
?