Can you integrate JavaScript accordion in a Shopify product page?

King-Kang
Trailblazer
148 8 76

Hi,

I want to use this accordion in my product page (I'll style it later).

But I don't know how to use the javascript inside the admin product page description.

I think I need to put the javascript code somewhere in product-template.liquid and link it to something like {{ product.description }}, but Im not sure. 

Can you help me?

Thank you

Replies 2 (2)

King-Kang
Trailblazer
148 8 76

I found that, the JQuery library was missing. So I added the following code

 

<script src="//code.jquery.com/jquery-2.2.4.min.js"></script>

 

 But now, for some reason it adds a page padding-top of 125px...

Also the arrow styles are missing or not loading.

Can you help me?

Thank you

King-Kang
Trailblazer
148 8 76

Can you help me?

Thank you