Jump to content

Add collapse option at the END of long FAQ accordion answer.

Recommended Posts

Site URL: https://www.kvmexhibits.org/showmoredemo

In the second section of the provided url, I'm using the following:

### **+RYAN'S CIRCUS**
Held in October 1991...

Then at the bottom of the section I'm using the following code block:
<script type="text/javascript"src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script><script>$(document).ready(function(){$('.markdown-block .sqs-block-content h3').css('cursor','help');$(".markdown-block .sqs-block-content h3").nextUntil("h3").slideToggle();$(".markdown-block .sqs-block-content h3").click(function(){$(this).nextUntil("h3").slideToggle();});});</script>

I'm wondering if there's an addition to this code that would add a collapse function at the end of a markdown. On mobile, some of these markdowns will be really long and it would be nice to just collapse when you're done reading, instead of scrolling back up to collapse it.


Link to comment
  • Replies 2
  • Created
  • Last Reply


This topic is now archived and is closed to further replies.

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.