Slider decimal increment
So I managed to get it to work with the in build atribute onSlide(event,ui).
<p:slider onSlide="onSlide(event, ui)" id="slder" for="blabla" minValue="50" maxValue="300" step="5" style="width: 450px"/>
I divide the value I get on slide with /10 and get the decimal number from the onSlide function and then show it to an output field
function onSlide(event, ui) {
var temp = ui.value / 10;
document.getElementById('slider:output2').innerHTML = temp
}
But now I have the problem with pm:inputSlider cause it has none such atribute
<p:slider onSlide="onSlide(event, ui)" id="slder" for="blabla" minValue="50" maxValue="300" step="5" style="width: 450px"/>
I divide the value I get on slide with /10 and get the decimal number from the onSlide function and then show it to an output field
function onSlide(event, ui) {
var temp = ui.value / 10;
document.getElementById('slider:output2').innerHTML = temp
}
But now I have the problem with pm:inputSlider cause it has none such atribute
-
- Information
-
Who is online
Users browsing this forum: No registered users and 49 guests