Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
Sign in to follow this  
Guest

Expandable text sections in Avenue, like in Wikipedia mobile?

Question

Guest

Hello everyone. In Avenue, we are looking for a way to allow readers to expand sections of text by clicking on headings or subheadings. The mobile version of Wikipedia offers a perfect illustration of this functionality: when you click on a heading, the body text appears. Click the heading again and the body text hides. On Wikipedia mobile, those headings look like this when the body text is hidden ? Heading and like this when the body text is displayed ? Heading. Thank you!

Edited by Guest
retag

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 1

The question has been asked before and a good answer with explanations given. How can I create accordion style hide/show blocks of text?. For the source article cited in that question, see Sandeep's Nook: JavaScript Page

Another question here that had a different solution is Five: Making FAQ page accordion style?. This one uses markdown blocks and some script provided by @silvabokis; see his site at silvabokis.com.

Another solution, this one to hide/show not just text but graphics also, is at How do I create hide/show section of an entire page of text, images and or galleries in Squarespace (spoiler function/accordian/collapse)?.

Perhaps the earliest answer on this forum to this question is again by @silvabokis in the thread How do I create hide/show text on a page, like you see with FAQs?. There is good discussion by and contributions from others.

See also How to tweak this code for hide/show text toggle?.

Edited by alxfyv
add further research results

I'm a retired attorney who was asked by a friend to build a website. In a prior lifetime, in a galaxy far, far away and long, long ago, I was a computer systems analyst / programmer. I'm a novice autodidact in CSS, JavaScript and HTML learning in part by example.. I've asked questions on this forum and been lucky enough to have others help me, so I'm inclined to answer any question I can. Pay it forward.

Share this post


Link to post
  • 0

I amended the answer to include further results from further research.


I'm a retired attorney who was asked by a friend to build a website. In a prior lifetime, in a galaxy far, far away and long, long ago, I was a computer systems analyst / programmer. I'm a novice autodidact in CSS, JavaScript and HTML learning in part by example.. I've asked questions on this forum and been lucky enough to have others help me, so I'm inclined to answer any question I can. Pay it forward.

Share this post


Link to post
  • 0
Guest

Thank you very much for this answer!

Share this post


Link to post
  • 0
Guest

Oops, I see the special characters did not display in my question. Instead of the question marks (? Heading), there should be an arrow pointing up and and arrow pointing down.

Share this post


Link to post
  • 0

You're quite welcome. Do me a favor please and accept the answer and vote it up.


I'm a retired attorney who was asked by a friend to build a website. In a prior lifetime, in a galaxy far, far away and long, long ago, I was a computer systems analyst / programmer. I'm a novice autodidact in CSS, JavaScript and HTML learning in part by example.. I've asked questions on this forum and been lucky enough to have others help me, so I'm inclined to answer any question I can. Pay it forward.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...