title: Inserting dynamic html content
body: <p>I have a form where one can add multiple questions using the "Add Question" button. If you click on the button, a new accordion-group is created.</p>
  
  <pre><code>&lt;div id="accordion1" class="accordion"&gt;
        &lt;div id="group1" class="accordion-group"&gt;
             &lt;input type='text' id='question1' class='textbox-input'/&gt;
        &lt;/div&gt;
  &lt;/div&gt;
  &lt;input type"button" value="Add Question" id="addQuestion" onclick="javascript:addQuestion();"/&gt;
  
  &lt;script&gt;
   function addQuestion(){
         var previousContent = document.getElementById("accordion1").innerHTML;
         var newContent = "&lt;div id='group2' class='accordion-group'&gt;" +
                          "&lt;input type='text' id='question2' class='textbox-input'/&gt;" +
                          "&lt;/div&gt;";
         document.getElementById("accordion1").innerHTML = previousContent + newContent;
   }
  &lt;/script&gt;
  </code></pre>
  
  <p>I also have some scripts that give styling to the textboxes, but those styles do not get applied to the new dynamic content added. And also the select boxes places inside each accordion-group gets disabled. Does anyone know how to solve this?</p>