Script: Sliders - Repeat Scale

This article will help you repeat a scale in a slider question


Background

You may want to display your scale every X rows. This script will help you set that up. 


Instructions

  1. Program your 'Slider' question
  2.  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
      var $ = jQuery,
      every = 1, /* UPDATE THE NUMBER OF ROWS THE SCALE IS REPEATED */
      headers1 = $(".cm-sliders-header-row__container"),
      headers2 = $(".cm-sliders-group-row");
      
      
      $(".cm-slider-container:nth-child(" + every + "n + " + (every + 3) + ")").each(function(){
      headers1.clone().insertBefore( $(this) );
      headers2.clone().insertBefore( $(this) );
      });
      		
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us