# Dynamic Accordion Creation

**URL:** <https://forum.pinegrow.com/t/dynamic-accordion-creation/1086>\
**Category:** General\
**Created:** [July 7, 2017, 10:10pm UTC](https://forum.pinegrow.com/t/dynamic-accordion-creation/1086 "2017-07-07T22:10:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Don213](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@Don213](https://forum.pinegrow.com/u/Don213)\
**Post date:** [July 7, 2017, 10:10pm UTC](https://forum.pinegrow.com/t/dynamic-accordion-creation/1086/1 "2017-07-07T22:10:45Z")

</div>

I am creating a dynamic accordion with .innerHTML and the when i try to open the accordion, it does not open/work. I can see the accordion, but it does not open.

var q = document.getElementById(‘Layer Menu’);

```
    q.innerHTML = TS

```

I have used the accordion provided in the pinegrow menu to create an accordion and I am now using innerHTML to create an accordion dynamically but the accordion does not open when i select it. How do i make this work? I have searched the web a while to find a solution but i haven’t quite been able to find one. Thanks for the help!

 ![](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/1X/d2e857859ada228109a5c77ec14d43b314abe975.jpg)

(Reminder: First accordion is not dynamically created)
