Jump to content

wklz

Member
  • Posts

    73
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by wklz

  1. 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
×
×
  • 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.