Follow up to my previous question. Using the coding below, I can get a slider to appear in my problem. However, the script is not type="loncapa". I would like to be able to get the slider bar response and save it in a variable that I can use elsewhere in the problem. Also, I would like to be able to store the students' confidence levels for research reasons.
Thanks, Sally Code: <part id="p3"> <p>How confident are you that your answer is correct? Move the slider bar to the right to indicate high confidence (100) and to the left to indicate low confidence (1).</p> <input type="range" min="1" max="100" value="50" id="myRange"></input> <p>Your confidence is <span id="x"></span></p> <script> var slider = document.getElementById("myRange"); var output = document.getElementById("x"); output.innerHTML = slider.value; slider.oninput = function() { output.innerHTML = this.value; } </script> On Tue, Jun 18, 2019 at 2:32 PM Sally S Hunnicutt <sshun...@vcu.edu> wrote: > Hello, > > Has anyone developed a slider question as a type of question? For example, > I would like to ask students to give their confidence, using a slider bar, > that the question they have answered is the correct answer. > > Thanks, > Sally Hunnicutt > VCU >
_______________________________________________ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org http://mail.lon-capa.org/mailman/listinfo/lon-capa-users