How to Create the Accordion Effect in...

User 2056301 Photo


Registered User
55 posts

www.creative-motivations.com

Hi, Id like to create the accordion effect on my FAQs page. As you can see, I have alotta FAQs, I plan to reduce them, but to make the page cleaner, I'd like to use the accordion effect, wherein the person clicks on the question and the answer slides out below it. I dont want a box or anything like that, just the text of the question, maybe a plus or something next to it (tho thats not necessary), then you click and BOOM! the answer slides out below it, lol. Ive looked around online and it seems there are many different methods, but Im not sure what method works best in SCCP and frankly, they all sounded surprisingly complicated.

I assumed Id just put some code in the top, then wrap each question in some more code, then put some more code at the bottom, lol. Can someone advise me specifically what codes I need to use, etc?

Thanks guys.
User 187934 Photo


Senior Advisor
20,271 posts

Do you have a link to a site that has what your looking for as an example?:)
I guess I don't know how were going to make the text appear without having some sort of box appear. Checkout this page to see if this is similar to what your looking for. You could always do this with a simple mouseover.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2056301 Photo


Registered User
55 posts

whoops! heres the 3rd one: http://www.store-laf.org/faq.html

now, theres a yellow box that appears, but if that box was white, it wouldnt even be visible. hmmm. :)
User 2056301 Photo


Registered User
55 posts

IN FACT! on that giant food link, you see how they have those tabs for diff categories of faqs? THAT would be peeeeeerfect. Any ideas on how to achieve something like that? (dont kill me, lol)
User 364143 Photo


Guest
5,410 posts

There are some accordion java script/jQuery scripts available from a quick Google search. I don't know how well they will work with the shopping cart but is worth the attempt.
CoffeeCup... Yeah, they are the best!
User 187934 Photo


Senior Advisor
20,271 posts

Thanks Tom, I've never used them before and it's the first time that I've ever heard anybody ask about them. I have seen them on pages just didn't know the terminology.:) I'll check it out.:cool:
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2056301 Photo


Registered User
55 posts

yea i did a google search, but frankly, i didnt even know what i was looking at, lol. someone with more experience with coding and all that sure would come in handy here ;) (hint hint @eric)
User 187934 Photo


Senior Advisor
20,271 posts

See if this is what your looking for. If it is then I'll take it further.:)
http://progrower.coffeecup.com/accordian.html
Remember that the shop has a 15k character limit for each page.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 72973 Photo


Ambassador
97 posts

Here is a link that may help explain how that is done using java script with jquery. http://andylangton.co.uk/articles/javascript/jquery-show-hide-multiple-elements/
Robert Bruce

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.