Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

issues with script for initially hiding slider handle

More
7 hours 3 minutes ago #274618 by Malte
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 6.17.10+260622
Own server or LimeSurvey hosting: own server
Survey theme/template: Fruity TwentyThree ( fruity_twentythree )
==================

Hello,

I recently realized that this very helpful script from the forum for initially hiding the handle in slider-questions seems to have an issue in Version 6 (see attached screenshot).
I would greatly appreciate if someone could help me out fixing it and also help me how I could achieve a somewhat thicker line/bar on which the handle can be placed/moved.

Best wishes,
Malte

Please Log in to join the conversation.

More
4 hours 12 minutes ago - 4 hours 11 minutes ago #274620 by Joffm
Hi,

for initially hiding the handle

You don't need a script to achieve this.
Just some css, like:
Code:
<style type="text/css">
/* Hide the tooltip */
.slider .tooltip {
    display:none !important;
}
 
/* Hide the handle initially */
.slider.slider-untouched .slider-handle {
    display: none;
}
 
/* Change the height of the track */  
.slider.slider-horizontal .slider-track {
    height: 10px !important;
}
 
/* Change the appearance of the handle
1. adapt to the new height
2. change color 
3. add a border  */   
.slider .slider-handle {
    background-color: blue !important;
    border: 2px solid red !important;
    top: 4px;
}
</style>

   

Best you investigate yourself using the webdevelopment tool of your browser (F12).
Here you can try and adapt to your needs, like color of the track.

And check the custom.css of your extended theme to set these things directly here.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 hours 11 minutes ago by Joffm.
The following user(s) said Thank You: Malte

Please Log in to join the conversation.

More
1 hour 46 minutes ago #274621 by Malte
Thanks Joffm!

This is (as usual) very helpful & easy to implement.
I also adapted the styling to hide the slider-selection (i.e. coloured in section of the slider-track).

Best,
Malte

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose