title: Bootstrap collapse events not working after generating table page in Ajax
body: <p>I'm using the "shown.bs.collapse" and "hidden.bs.collapse" bootstrap events in a table. On the first page the events are being triggered and listened just fine with </p>
  
  <pre><code> $('#accordion')
     .on('shown.bs.collapse', function (e) {
         var id = e.target.id;
          loadBatchFileDetails(id);
     })
     .on('hidden.bs.collapse', function (e) {
         var id = e.target.id;
          $("#details_" + id).hide();
          $('#loader_' + id).show();
     });
  </code></pre>
  
  <p>put inside a document.ready.
  The table is paginated, and the other pages are generated with an ajax call and a success callback :</p>
  
  <pre><code>success: function (e) {
          $('#batchFilesList').html(e);
  </code></pre>
  
  <p>The issue is that the bootstrap events are no longer being listened afterwards. I tried to re-register the events in the callback just like every posts I found here suggested (e.g. <a href="https://stackoverflow.com/questions/33131618/bootstrap-3-event-hidden-bs-collapse-not-fired-if-the-accordion-is-inside-a-mo">Bootstrap 3 - Event hidden.bs.collapse not fired if the accordion is inside a modal populated via ajax</a>), but nothing did the trick. All the other type of regular events are working when being registered in the callback or if the were already registered in the page, only the "[...].bs.collapse" ones are not being listened...</p>
  
  <p>Any suggestions ? I tried so many things I'm out of ideas :/ I tried with the <code>done()</code>, <code>$find()</code> methods, tried other ajax complete/stop callbacks etc. but nothing worked. </p>