title: Datatables header align when sidebar is collapsed: trigger class change
body: <p>I'm using <a href="https://datatables.net/" rel="nofollow noreferrer">datatables</a> with scrollY actived and <a href="https://almsaeedstudio.com/themes/AdminLTE/index2.html" rel="nofollow noreferrer">AdminLTE2</a> theme:</p>
  
  <pre><code>acquisitionTable = $('#acquisitionsTable').DataTable({
              responsive: true,
  //          "bLengthChange": false,
              deferRender:    true,
              scrollY:        '60vh',
              scrollCollapse: true,
              scroller:       true,
  </code></pre>
  
  <p>the problem is the header align when sidebar is collapsed</p>
  
  <p><a href="https://i.stack.imgur.com/oKV59.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oKV59.png" alt="enter image description here"></a></p>
  
  <p>and this problem is widespread but all the solutions that I tryed have failed.
  I thought to call <code>acquisitionTable.columns.adjust();</code> but how can I catch the collapse and expand events?
  This is the sidebar:</p>
  
  <pre><code>&lt;!-- Left side column. contains the logo and sidebar --&gt;
  &lt;aside class="main-sidebar"&gt;
      &lt;!-- sidebar: style can be found in sidebar.less --&gt;
      &lt;section class="sidebar"&gt;
          &lt;!-- Sidebar user panel --&gt;
          &lt;div class="user-panel"&gt;
              &lt;div class="pull-left image"&gt;
                  &lt;img th:src="@{/static/assets/dist/img/fca.jpg}" class="img-circle"
                      alt="User Image"&gt;
              &lt;/div&gt;
              &lt;div class="pull-left info"&gt;
                  &lt;p sec:authentication="principal.name"&gt;&lt;/p&gt;
                  &lt;i class="fa fa-circle text-success"&gt;&lt;/i&gt; Online
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;!-- sidebar menu: : style can be found in sidebar.less --&gt;
          &lt;ul class="sidebar-menu"&gt;
              &lt;li class="header"&gt;MAIN NAVIGATION&lt;/li&gt;
              &lt;li&gt;&lt;a th:href="@{/}"&gt; &lt;i class="fa fa-dashboard"&gt;&lt;/i&gt; &lt;span&gt;Dashboard&lt;/span&gt;
              &lt;/a&gt;&lt;/li&gt;
              &lt;li sec:authorize="hasRole('ROLE_ADMIN')" class="treeview"&gt;&lt;a
                  href="#"&gt; &lt;i class="glyphicon glyphicon-cog"&gt;&lt;/i&gt; &lt;span&gt;Administration&lt;/span&gt;
                      &lt;span class="label label-primary pull-right"&gt;5&lt;/span&gt;
  ....
  </code></pre>
  
  <p>From the documentation (and I check it with debug mode) when the sidebar is collapsed the class <code>.sidebar-collapse</code> is added to body tag.
  Thanks</p>