Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/Content/jQuery/jQueryPlugins/DataTables-1.7.6/media/unit_testing/tests_onhold/1_dom/2635.js @ 6286

Last change on this file since 6286 was 6286, checked in by dkahn, 13 years ago

#1198 Added jQuery plus plugins

File size: 940 bytes
Line 
1// DATA_TEMPLATE: dom_data
2oTest.fnStart( "2635 - Hiding column and state saving" );
3
4$(document).ready( function () {
5  $('#example').dataTable( {
6    "bStateSave": true
7  } );
8 
9  oTest.fnTest(
10    "Set the hidden column",
11    function () {
12      $('#example').dataTable().fnSetColumnVis( 2, false );
13    },
14    function () { return $('#example thead th').length == 4; }
15  );
16 
17  oTest.fnTest(
18    "Destroy the table and remake it - checking one column was removed",
19    function () {
20      $('#example').dataTable( {
21        "bStateSave": true,
22        "bDestroy": true
23      } );
24    },
25    function () { return $('#example thead th').length == 4; }
26  );
27 
28  oTest.fnTest(
29    "Do it again without state saving and make sure we are back to 5 columns",
30    function () {
31      $('#example').dataTable( {
32        "bDestroy": true
33      } );
34    },
35    function () { return $('#example thead th').length == 5; }
36  );
37 
38  oTest.fnCookieDestroy( $('#example').dataTable() );
39  oTest.fnComplete();
40} );
Note: See TracBrowser for help on using the repository browser.