Hello SoSci team,
I am using sliders in my study to examine, for example, how unattractive or attractive a face is. AT the moment present the slider with the center starting at 50% and then increasing up to 100% on both directions. For that I use the html code below:
! <script type="text/javascript">
<!--
var formatter = function(value) {
if (value < 0) return "";
if (value < 50) {
value = (102-value);
}
value = Math.round(value-1);
return value + "%";
}
SoSciSliders.setFormat(formatter);
// -->
</script>
My question is, how can adjust this code so that the starting point in the center is set to 0 (not 50) with increases of up to 100 on both directions?
Thank you for your help!
Best