How do I create hide/show FAQs in Squarespace (collapsed text) ? in Customize with code Posted March 11, 2015 · Edited March 11, 2015 by wklz In order to achieve Show/Hide FAQs you can use the Markdown Block and a jQuery script, as shown in this tutorial on this site (here) First, you need to inject this code call below, in the site-wide Code Injection (Settings > Advanced > Code Injection Header): Code call: <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> Then, you need to add this jQuery script below in the page specific Code Injection: <script> $(document).ready(function(){ $('.markdown-block .sqs-block-content h2').css('cursor','pointer'); $(".markdown-block .sqs-block-content h2").nextUntil("h2").slideToggle(); $(".markdown-block .sqs-block-content h2").click(function() {$(this).nextUntil("h2").slideToggle();}); }); </script> Then you will need to add a Markdown Block on the page with the following structure: ## **+ QUESTION 1** REPLY 1 ## **+ QUESTION 2** REPLY 2 ## **+ QUESTION 3** REPLY 3 In this video below, I have guided you through the whole process: SOURCE FOR THE CODE: Silva Bokis
How do I create hide/show FAQs in Squarespace (collapsed text) ? in Customize with code Posted March 11, 2015 · Edited August 29, 2016 by Testing2134 retag FAQs with code logaritym, drawingwithindesign and bgrig 3
How do I create hide/show FAQs in Squarespace (collapsed text) ?
in Customize with code
Posted · Edited by wklz
In order to achieve Show/Hide FAQs you can use the Markdown Block and a jQuery script, as shown in this tutorial on this site (here)
First, you need to inject this code call below, in the site-wide Code Injection (Settings > Advanced > Code Injection Header):
Code call:
Then, you need to add this jQuery script below in the page specific Code Injection:
Then you will need to add a Markdown Block on the page with the following structure:
In this video below, I have guided you through the whole process:
SOURCE FOR THE CODE: Silva Bokis