Fix: IE8 events error

* In IE8 if the DataTables width calculation functions were being
  triggered DataTables would clone the table node and then do a jQuery
  $().remove() on the cloned node. This was bad in IE8 as it meant that
  on the remove the events that were attached tot he original table were
  removed as well as the ones on the clone table. IE8 must retain some
  kind of link between the original and clone nodes. Using jQuery's
  clone() method resolves this.
* See thread 21040 for more information
This commit is contained in:
Allan Jardine
2014-05-23 16:30:53 +01:00
parent de1d6541ef
commit 00a99a0037
3 changed files with 24 additions and 9 deletions

View File

@@ -20,7 +20,11 @@
$(document).ready(function() {
$('#example').dataTable();
$('#example').dataTable( {
columnDefs: [
{ targets: 0, width: '50px' }
]
} );
} );
@@ -535,7 +539,11 @@ $(document).ready(function() {
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
$('#example').dataTable();
$('#example').dataTable( {
columnDefs: [
{ targets: 0, width: '50px' }
]
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this