addsliderticks
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| addsliderticks [2022/09/28 20:20] – admin | addsliderticks [2022/09/28 20:29] (current) – admin | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| < | < | ||
| </ | </ | ||
| - | Alternatively, | + | Alternatively, |
| ==== Slider Question ==== | ==== Slider Question ==== | ||
| === Question Settings === | === Question Settings === | ||
| * Turn on Mobile Friendly | * Turn on Mobile Friendly | ||
| - | * Add desired number of gridlines | + | * Set desired number of gridlines |
| === Question JavaScript === | === Question JavaScript === | ||
| Add JS to call the addSliderTicks function to apply it to the Slider question as follows: | Add JS to call the addSliderTicks function to apply it to the Slider question as follows: | ||
| Line 32: | Line 32: | ||
| </ | </ | ||
| - | To change the default options, specify the desired [[addsliderticks# | + | To change the default options, specify the desired |
| < | < | ||
| Qualtrics.SurveyEngine.addOnload(function() { | Qualtrics.SurveyEngine.addOnload(function() { | ||
| Line 40: | Line 40: | ||
| ===== Options ===== | ===== Options ===== | ||
| ==== bottomMarginTop ==== | ==== bottomMarginTop ==== | ||
| - | **bottomMarginTop** is an integer, usually negative, that specifies the top margin of the bottom ticks in pixels. This determines the space between slider bar and the bottom ticks. The ideal margin will vary based on theme and layout. Instead of this option, use CSS to set a consistent margin for the entire survey. | + | **bottomMarginTop** is an integer, usually negative, that specifies the top margin of the bottom ticks in pixels. This determines the space between slider bar and the bottom ticks. The ideal margin will vary based on theme and layout. Instead of this option, use **[[addsliderticks# |
| Default: undefined (use CSS instead) | Default: undefined (use CSS instead) | ||
| Line 68: | Line 68: | ||
| Default: true | Default: true | ||
| + | ===== CSS for Tick Margins ===== | ||
| + | Here is example CSS for tick margins (these particular styles are for Classic layout): | ||
| + | < | ||
| + | .JFEScope .Skin .q-slider ul.ticks.top { margin-bottom: | ||
| + | .JFEScope .Skin .q-slider ul.ticks.bottom { margin-top: -14px; } | ||
| + | </ | ||
| ====== Qualtrics Wiki ====== | ====== Qualtrics Wiki ====== | ||
| [[start|Qualtrics Wiki]] | [[start|Qualtrics Wiki]] | ||
addsliderticks.1664410832.txt.gz · Last modified: by admin
