Welcome to the LimeSurvey Community Forum

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

Show / hide text

More
11 years 1 month ago #91550 by ctdh
Show / hide text was created by ctdh
I would like to create some information content at the beginning of my survey, but rather than show it all I would like the participant to be able to click a title to display the related information text.

Is there a simple java script I can use?

Which question type do you recommend for doing this?

Example:

click this heading to see some information you might want to read
Some information is hidden unless you wan to see it

Thanks for your help

Charles
The topic has been locked.
More
11 years 1 month ago - 11 years 1 month ago #91556 by Ben_V
Replied by Ben_V on topic Show / hide text
Hello,
Try something like this adding some CSS rules to get it smarter
Code:
<div id="MyToggle_link" onclick="$('#MyToggle').toggle('slow',function(){window.scrollTo(0,window.innerHeight+300);});">
Your text [] ... (or button) <input type="button" value="Expand/Collapse ⇅">
</div><!-- Start expand -->
<div id="MyToggle" style="display:none;color:#f55" onclick="document.getElementById('up_down').style.display='none'">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, set eiusmod tempor incidunt et labore et dolore magna aliquam...
</div>

Ben/

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last edit: 11 years 1 month ago by Ben_V.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose