title: How to make Twitter Bootstrap Collapse work on dynamically loaded html using ajax
body: <p>I am loading html using <strong>ajax</strong> call, this html has <strong>Bootstrap Collapse</strong>. The issue is <strong>Collapse is not working</strong>, if you click it will expand but it won't collapse again.</p>
  
  <p>To check if I am doing something wrong, I put the same code on a static page (not loaded using ajax) and it works fine. So its seems issue only with dynamically loaded html.</p>
  
  <p>I tried manually enabling Collapse using </p>
  
  <pre><code>$(".collapse").collapse() 
  </code></pre>
  
  <p>but still same issue. </p>
  
  <p>I guess I need to use jquery's <code>live() / on()</code> methods, because the html is dynamic, but not sure how do I do that for calling <code>$(".collapse").collapse()</code> because I think it only works on events or is it something else that I need to do ?</p>