showing slider value during slider movement
I didn't see an option for displaying the current value of the slider while it is being moved. Have I missed it?
No, that's not currently implemented. If you have a small number of values then you can make the number of steps equal to the number of labels.
@stefanuddenberg has implemented this and a few other improvements. @jodeleeuw: should I ask him to submit a pull request?
Got a solution. Not a very general one but it's simple and works for me. I'm adding this comment here in case anyone stumbles on this trying to find a solution or if someone with real dev skills needs an idea to move forward with a more general solution.
I wanted this function in the html-slider-response. Got it to work using the stimulus parameter to house/present the slider value (meaning no other stimulus value). I initialize the stimulus parameter with "" and have it update whenever the slider is changed by adding the code below to the html-slider-response plugin file just before "if(trial.require_movement){".
That was it really. The current slider value appears just above the slider every time the slider is clicked on. I'm sure if someone spent some more time that they could improve the functionality but this suits my problem and maybe other people's.
display_element.querySelector('#jspsych-html-slider-response-response').addEventListener('click', function(){ //console.log(display_element.querySelector('#jspsych-html-slider-response-response').valueAsNumber); // for testing display_element.querySelector('#jspsych-html-slider-response-stimulus').textContent = display_element.querySelector('#jspsych-html-slider-response-response').valueAsNumber; });
See #1192 and #1701 for some <=7.0 implementations.