| 1 |
// DATA_TEMPLATE: dom_data |
| 2 |
oTest.fnStart( "fnDeleteRow" ); |
| 3 |
|
| 4 |
$(document).ready( function () { |
| 5 |
/* Check the default */ |
| 6 |
var oTable = $('#example').dataTable(); |
| 7 |
var oSettings = oTable.fnSettings(); |
| 8 |
|
| 9 |
oTest.fnTest( |
| 10 |
"Check that the default data is sane", |
| 11 |
null, |
| 12 |
function () { return $('#example tbody td:eq(1)').text() == 'Firefox 1.0'; } |
| 13 |
); |
| 14 |
|
| 15 |
oTest.fnTest( |
| 16 |
"Remove the first data row, and check that the search data has been updated", |
| 17 |
function () { oTable.fnDeleteRow( $('#example tbody tr')[0] ); }, |
| 18 |
function () { return $('#example tbody td:eq(1)').text() == 'Firefox 1.5'; } |
| 19 |
); |
| 20 |
|
| 21 |
oTest.fnTest( |
| 22 |
"Check that the info element has been updated", |
| 23 |
null, |
| 24 |
function () { return $('#example_info').html() == "Showing 1 to 10 of 56 entries"; } |
| 25 |
); |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
oTest.fnComplete(); |
| 30 |
} ); |