- Posts: 13907
- Thank you received: 2546
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Change slider handle as slider value changes
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
5 years 4 months ago #176421
by DenisChenu
Can you pit your snippet here ? (and maybe in our workaround in manual).
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Change slider handle as slider value changes
Thanks, just for information (and other user) : how do you manage the emoji ? With class ?rickanderson wrote: I'm managing to access the slider values using your code (I had to change $(this).value() to $(this).val()) so should now be able to use these to customise the slider handles, fantastic!
Can you pit your snippet here ? (and maybe in our workaround in manual).
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
5 years 4 months ago #176434
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change slider handle as slider value changes
Or, even better, a custom question theme.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13907
- Thank you received: 2546
5 years 4 months ago #176441
by DenisChenu
For example : if slider have 5 value : need a system to choose emoji.
Here : i think it can be an attribute in plugin, i don't think we need a complete question theme . Then if core update : attribute can still live with the new feature ready.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Change slider handle as slider value changes
Yes, but it's hard to do a global theme.tpartner wrote: Or, even better, a custom question theme.
For example : if slider have 5 value : need a system to choose emoji.
Here : i think it can be an attribute in plugin, i don't think we need a complete question theme . Then if core update : attribute can still live with the new feature ready.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
5 years 4 months ago #176454
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change slider handle as slider value changes
I would use question attributes/settings to define the emoji break points so they could be adjusted for any slider scale.For example : if slider have 5 value : need a system to choose emoji.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13907
- Thank you received: 2546
5 years 4 months ago #176457
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Change slider handle as slider value changes
Oh, personnaly : i mean : if we have 5 answers : need 5 settings, if 11 answers : need 11 settings etc …
I think of arrayTextAdapt in question template for example : www.limesurvey.org/index.php?option=com_...textadapt&Itemid=729
I think it's a good candidate, but don't find how to setbeasily the params (except with a textarea and some explode("|',value-in-param) or something other .
I think of arrayTextAdapt in question template for example : www.limesurvey.org/index.php?option=com_...textadapt&Itemid=729
I think it's a good candidate, but don't find how to setbeasily the params (except with a textarea and some explode("|',value-in-param) or something other .
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
5 years 4 months ago #176462
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change slider handle as slider value changes
I would limit it to 5 emojis but let the admin select where they change.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- rickanderson
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 30
- Thank you received: 3
5 years 4 months ago #176475
by rickanderson
Replied by rickanderson on topic Change slider handle as slider value changes
The emoji is currently just a background image on the custom slider:
with slider images (see attachment - probably not final images but for testing)
I haven't had time so far but I'm hoping to just read the slider value and update the background image appropriately.
Let me know if you require any further info or if you think there may be a better approach.
Cheers
...Rick.
Code:
.slider .slider-handle.custom::before { display: inline-block; width: 20px; height: 20px; margin-top: 5px; margin-left: 5px; border-radius: 20px; background: transparent url(../files/slider00.png) center center no-repeat; background-size: cover; content: ''; }
with slider images (see attachment - probably not final images but for testing)
I haven't had time so far but I'm hoping to just read the slider value and update the background image appropriately.
Let me know if you require any further info or if you think there may be a better approach.
Cheers
...Rick.
Attachments:
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13907
- Thank you received: 2546
5 years 4 months ago - 5 years 4 months ago #176498
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Change slider handle as slider value changes
Yes, maybe only need update class , something like :rickanderson wrote: I haven't had time so far but I'm hoping to just read the slider value and update the background image appropriately.
Code:
$(this).closest(".answer-item").find(".slider-handle").removeClass("emoji-1 emoji-2 emoji-3 emoji-4 emoji-5 emoji-6 emoji-7 emoji-8 emoji-9 emoji-10").addClass("emoji-"+$(this).value());
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 5 years 4 months ago by DenisChenu. Reason: typo
The following user(s) said Thank You: rickanderson
The topic has been locked.
- rickanderson
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 30
- Thank you received: 3
5 years 4 months ago #176566
by rickanderson
Replied by rickanderson on topic Change slider handle as slider value changes
Seems to be working a treat with following:
Thanks again everyone for all your help.
Cheers
...Rick.
Code:
$(this).closest(".slider-item").find(".slider-handle").removeClass("emoji0 emoji1 emoji2 emoji3 emoji4 emoji5 emoji6 emoji7 emoji8 emoji9 emoji10").addClass("emoji"+$(this).val());
Thanks again everyone for all your help.
Cheers
...Rick.
The topic has been locked.