title: Sort jQuery DataTable after changing column heading text
body: <p>When I dynamically change the column text of a jQuery datatable, it is no longer possible to sort the table by clicking on that column heading (though sorting the other columns in the table does remain functional). I need to change the column heading dynamically and I also need to sort the table. How can I do this?</p>
  <p>I have tried sorting using a couple of different methods:</p>
  <p>Method 1:</p>
  <pre><code>$($('#myTableID').DataTable().column(9).header()).text('new col title');
  </code></pre>
  <p>Method 2:</p>
  <p>HTML:</p>
  <pre><code>&lt;table id=&quot;myTableID&quot; class=&quot;table datatable&quot;&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;col 0&lt;/th&gt;
              &lt;th&gt;col 1&lt;/th&gt;                        
              &lt;th&gt;col 2&lt;/th&gt;
              &lt;th&gt;col 3&lt;/th&gt;
              &lt;th&gt;col 4&lt;/th&gt;
              &lt;th&gt;col 5&lt;/th&gt;
              &lt;th&gt;col 6&lt;/th&gt;
              &lt;th&gt;col 7&lt;/th&gt;
              &lt;th&gt;col 8&lt;/th&gt;
              &lt;th&gt;&lt;span id=&quot;changeMe&quot;&gt;col 9&lt;/span&gt;&lt;/th&gt;
              &lt;th&gt;col 10&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;&lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  <p>js:</p>
  <pre><code>$(window).on('load', function() {
      $('#changeMe').text('new col title');
  });
  </code></pre>