Script: Sliders - Move Label from Left to Above the Slider
This article will help you move the left label above the slider itself in a slider question
Background
You may want to display your left labels above the slider itself. This script will help you set that up.
Instructions
- Program your 'Slider' question
- See article: Add an Advanced Question: Slider
- Add the following code to the 'ADD JAVASCRIPT' field
- See article: Adding JavaScript and/or CSS to a Question
- Update the number in row two to display the scale every X rows
// Move the slider label from the left to above. var $ = jQuery; $(".cm-slider-container").each(function() { var empty_row = $(this).find(".cm-slider-empty-row"), label = $(this).find(".cm-slider-row__label-cell label"), label_content = label.html(); empty_row.find("td").html(label_content); label.empty(); $(this).prepend(empty_row); });