Adding hint for subquestion

More
4 months 3 weeks ago #212818 by Jmantysalo
I was asked to help in a situation where words in some subquestions might be unfamiliar to someone taking the survey. It is possible to have something like

Want to go to <a onclick="alert('Very relaxing hot and humid room.'); return false;">sauna</a>?

in a subquestion text. Do others have better idea? Maybe something like Show policy -link in the survey data policy.

Note: If I asked something and forgot to say version, I am using LS 4.x.

Please Log in to join the conversation.

More
4 months 3 weeks ago - 4 months 3 weeks ago #212820 by DenisChenu
Yes,

really better
sauna <a class="fa fa-question-circle text-info" data-content="Very relaxing hot and humid room" data-placement="top" data-toggle="popover" data-trigger="focus" role="button" tabindex="0" title=" "> </a>
OR
<a data-content="Very relaxing hot and humid room" data-placement="top" data-toggle="popover" data-trigger="focus" role="button" tabindex="0" title=" ">sauna</a>

And in custom.js
$('[data-toggle="popover"]').popover();

I must create a a11y cleaner solution before implement in skelvanilla

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: 4 months 3 weeks ago by DenisChenu. Reason: PS

Please Log in to join the conversation.

More
4 months 3 weeks ago #212824 by Joffm
Replied by Joffm on topic Adding hint for subquestion
You find more about tooltips and popovers here
getbootstrap.com/docs/3.4/javascript/#tooltips


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu, Jmantysalo

Please Log in to join the conversation.

More
4 months 3 weeks ago #212826 by Jmantysalo
Thanks! Both of them seems good, I'll let the user to choise. And it also works if I just put the js-code to the question, so no need to modify the theme.

Note: If I asked something and forgot to say version, I am using LS 4.x.

Please Log in to join the conversation.

More
4 months 3 weeks ago #212828 by DenisChenu
I use popover : getbootstrap.com/docs/3.4/javascript/#popovers

Really more powerfull than tooltip ...

And using focus triggered : allow open and don't close (keyboard compatible)

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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now