Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Show / hide text

Show / hide text 3 years 9 months ago #91550

  • ctdh
  • ctdh's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
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?


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

The administrator has disabled public write access.

Show / hide text 3 years 9 months ago #91556

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1842
  • Thank you received: 455
  • Karma: 116
Try something like this adding some CSS rules to get it smarter
<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...


EM Variables => | EM Roadmap =>
All LS releases => | 2.06lts =>
Demo surveys => (already included in /docs/demosurveys)
Last Edit: 3 years 9 months ago by Ben_V.
The administrator has disabled public write access.
Time to create page: 0.256 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form