Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
lrosen

Five: Making FAQ page accordion style?

Question

I’m building a site — firstpersonessaycoaching.com — and I’d like to hide the answers to the questions on my FAQ page so that they are revealed when you click on the text of the question.

I read Silvabokis’ How to create hide/show FAQs in Squarespace — but I would be out of my depth with jQuery. Would someone be able to suggest another way, or perhaps provide a little more guidance for the jQuery suggestions so that someone with very little experience can do it?

Thanks in advance.

Edited by emca

Share this post


Link to post

Recommended Posts

  • 0

Hi Guys - Got a bit of a problem...

I'm using the code above and everything is working perfectly for me in the admin pages and the accordion is working exactly as it should.

However, the accordion does not work on the live site.

I have spoken to Square Plugin Support who provided the code and they are unable to fix the problem. I have spoken to Sqaurespace Support and they cannot offer any help on any 3rd Party code.

Do you have ANY ideas why it would be working on the admin pages but not on the live site?

Share this post


Link to post
  • 0

@akshat01 I have pasted the two HTML codes like you said, but it is not working for me.

The questions and answers appear but the accordion feature is not there. I've pasted what you said in the header and also formatted the questions in the style you say in a code block.

I'm also using Five. Any idea what it could be?

Elissa

Share this post


Link to post
  • 0

@akshat01 I have pasted the two HTML codes like you said, but it is not working for me.

The questions and answers appear but the accordion feature is not there. I've pasted what you said in the header and also formatted the questions in the style you say in a code block.

I'm also using Five. Any idea what it could be?

Elissa

Share this post


Link to post
  • 0

Thanks so much for this code. I'm having difficulty getting it to work properly. It looks great in the editor. But through the live site the code doesn't work and acts like normal HTML. I'm using the Farro theme.

Share this post


Link to post
  • 0

Hello @luckydx302,

Please refrain from self-promotion without providing a solution to the question. This goes against the Squarespace Answers posting guidelines. We have gone ahead and removed the posts that violate these guidelines, which can be referenced here. Thank you.

Share this post


Link to post
  • 0

@akshat01

Great code, really easy to use but how can I change the theme to match my site (www.oggyoggyteam.com) ? I'm using the Bedford template

I have been playing around with some code but I can not get the effect I want. I have been mixing: -

Placing this in my header code section:

With: ( as a page code injection block)

Read more


 <div>
  <p>Test text d;oakfgjadsofjh ;oih pfdi aogi pih dokg [diajfg sd' jz[ijv 'dlm 'zpdogj [fd0 zdkjv [fi jbds j'dfjf [i jdkjg sfij[apovj 'zpdj ij[j 0 08u   [pojfd[dsij df jds 
   g;oidshgpsig js[dijg s
   sd[sijg [fsi jg[sijg p9sdij   poiudhfgp9sih g[sdijv 9[s8nug v[ isd jg[0</p>
</div>


With :-

Share this post


Link to post
  • 0

@Akshat01 This is amazing - thanks for sharing! Sorry to be a pain, but do you know what I should enter into the CSS to change the font of the text in the hidden answer areas? It's appearing as a different font to the normal font for the rest of the site, but I don't know enough about CSS to know what the code should be.

Share this post


Link to post
  • 0

I've run into 2 problems regarding this:1. I have a paralax image that comes after this block and it will not show until I expand the text. It seems to be compensating for the full length once the text block is revealed. I end up resizing the window and it refreshes itself, but this is not ideal.2. When I go to another location on my site then come back to the page with the expandable text blocks they no longer have the expandable capability, and all of the concealed text is actually visible! Like there wasn't even the concealment to begin with. Do you know why this might be the case?

Share this post


Link to post
  • 0

Hello @Akshat01 I have recently used this code on my page and it works beautifully but now I want to have the answers indent a little to align with the text rather than the + and I would also love the links in the text to open in a new window but that option doesn't appear. Do you know how I might do that? Thanks!

Share this post


Link to post
  • -1

There are many solutions out there (some good and some bad), but you'll need to do some Googling to find them. Basically, you'll need to Have some JavaScript run under the code injection section to manipulate some HTML within a code block. This feature is typically called a drop-down accordion.

Devon Stank @ Devonstank.com (Squarespace Tips & Tricks)

Edited by Vexsoft
Initial Revision

Share this post


Link to post
Guest
This topic is now closed to further replies.

×
×
  • Create New...