How to make an accordion dropdown in Squarespace

Insert this code into the ADVANCED part of the age settings.

<script type="text/javascript" src="//"></script>
$('.markdown-block .sqs-block-content h2').addClass('ui-closed').css('cursor','pointer');
$(".markdown-block .sqs-block-content h2").nextUntil("h2").slideToggle();
$(".markdown-block .sqs-block-content h2").click(function() {

$(this).toggleClass('ui-closed ui-open');

Then in the page, create a MARKDOWN section and For the headlines put ## in front of it.


+ Headline


Photos used

  • Taken from Unsplash, just search like Detroit / Abandoned and they will show up