annotate DataTables-1.9.4/extras/ColVis/two_tables_identical.html @ 0:ac5f9272033b draft

first upload
author saskia-hiltemann
date Tue, 01 Jul 2014 11:42:23 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
2 <html>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
3 <head>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
4 <meta http-equiv="content-type" content="text/html; charset=utf-8">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
5 <link rel="shortcut icon" type="image/ico" href="http://www.sprymedia.co.uk/media/images/favicon.ico">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
6
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 <title>ColVis example</title>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8 <style type="text/css" title="currentStyle">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9 @import "../../media/css/demo_page.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10 @import "../../media/css/demo_table.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 @import "media/css/ColVis.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12 </style>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13 <script type="text/javascript" charset="utf-8" src="../../media/js/jquery.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 <script type="text/javascript" charset="utf-8" src="../../media/js/jquery.dataTables.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15 <script type="text/javascript" charset="utf-8" src="media/js/ColVis.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16 <script type="text/javascript" charset="utf-8">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17 $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18 var oTables = $('table').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 "sDom": 'lfrtip'
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22 var oColVis = new ColVis( oTables.fnSettings(), {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23 "fnStateChange": function ( iColumn, bVisible ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24 var jqTables = $('table:not(#example)'); // ColVis will do #example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 for ( var i=0, iLen=jqTables.length ; i<iLen ; i++ ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26 $(jqTables[i]).dataTable().fnSetColumnVis( iColumn, bVisible );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
30
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
31 document.getElementById('buttonInsert').appendChild(oColVis.dom.wrapper);
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
32 oColVis.fnRebuild();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
33 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
34 </script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
35 </head>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
36 <body id="dt_example">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
37 <div id="container">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
38 <div class="full_width big">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
39 ColVis example - two tables with shared control
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
40 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
41
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
42 <h1>Preamble</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
43 <p>This example shows how the API that ColVis presents can be used to control the column visibility of two tables with a single instance of ColVis. The result is that changing a button state will effect all tables on the page. This can be useful when looking at multiple tables which have the same column structure.</p>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
44
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
45 <h1>Live example</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
46 <form>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
47 <div id="demo">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
48 <div id="buttonInsert">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
49
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
50 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
51 <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
52 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
53 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
54 <th>Rendering engine</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
55 <th>Browser</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
56 <th>Platform(s)</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
57 <th>Engine version</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
58 <th>CSS grade</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
59 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
60 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
61 <tfoot>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
62 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
63 <th>Rendering engine</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
64 <th>Browser</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
65 <th>Platform(s)</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
66 <th>Engine version</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
67 <th>CSS grade</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
68 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
69 </tfoot>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
70 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
71 <tr class="odd_gradeX">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
72 <td>Trident</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
73 <td>Internet Explorer 4.0</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
74 <td>Win 95+ (Entity: &amp;)</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
75 <td class="center">4</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
76 <td class="center">X</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
77 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
78 <tr class="even_gradeC">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
79 <td>Trident</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
80 <td>Internet Explorer 5.0</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
81 <td>Win 95+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
82 <td class="center">5</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
83 <td class="center">C</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
84 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
85 <tr class="odd_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
86 <td>Trident</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
87 <td>Internet Explorer 5.5</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
88 <td>Win 95+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
89 <td class="center">5.5</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
90 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
91 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
92 <tr class="even_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
93 <td>Trident</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
94 <td>Internet Explorer 6</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
95 <td>Win 98+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
96 <td class="center">6</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
97 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
98 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
99 <tr class="odd_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
100 <td>Trident</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
101 <td>Internet Explorer 7</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
102 <td>Win XP SP2+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
103 <td class="center">7</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
104 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
105 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
106 <tr class="even_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
107 <td>Trident</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
108 <td>AOL browser (AOL desktop)</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
109 <td>Win XP</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
110 <td class="center">6</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
111 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
112 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
113 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
114 </table>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
115
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
116 <table cellpadding="0" cellspacing="0" border="0" class="display" id="example2">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
117 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
118 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
119 <th>Rendering engine</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
120 <th>Browser</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
121 <th>Platform(s)</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
122 <th>Engine version</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
123 <th>CSS grade</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
124 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
125 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
126 <tfoot>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
127 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
128 <th>Rendering engine</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
129 <th>Browser</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
130 <th>Platform(s)</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
131 <th>Engine version</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
132 <th>CSS grade</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
133 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
134 </tfoot>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
135 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
136 <tr class="odd_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
137 <td>Gecko (UTF-8: $¢€)</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
138 <td>Firefox 1.0</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
139 <td>Win 98+ / OSX.2+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
140 <td class="center">1.7</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
141 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
142 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
143 <tr class="even_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
144 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
145 <td>Firefox 1.5</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
146 <td>Win 98+ / OSX.2+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
147 <td class="center">1.8</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
148 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
149 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
150 <tr class="odd_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
151 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
152 <td>Firefox 2.0</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
153 <td>Win 98+ / OSX.2+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
154 <td class="center">1.8</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
155 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
156 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
157 <tr class="even_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
158 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
159 <td>Firefox 3.0</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
160 <td>Win 2k+ / OSX.3+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
161 <td class="center">1.9</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
162 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
163 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
164 <tr class="odd_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
165 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
166 <td>Camino 1.0</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
167 <td>OSX.2+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
168 <td class="center">1.8</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
169 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
170 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
171 <tr class="even_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
172 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
173 <td>Camino 1.5</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
174 <td>OSX.3+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
175 <td class="center">1.8</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
176 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
177 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
178 <tr class="odd_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
179 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
180 <td>Netscape 7.2</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
181 <td>Win 95+ / Mac OS 8.6-9.2</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
182 <td class="center">1.7</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
183 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
184 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
185 <tr class="even_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
186 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
187 <td>Netscape Browser 8</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
188 <td>Win 98SE+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
189 <td class="center">1.7</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
190 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
191 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
192 <tr class="odd_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
193 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
194 <td>Netscape Navigator 9</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
195 <td>Win 98+ / OSX.2+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
196 <td class="center">1.8</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
197 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
198 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
199 <tr class="even_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
200 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
201 <td>Mozilla 1.0</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
202 <td>Win 95+ / OSX.1+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
203 <td class="center">1</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
204 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
205 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
206 <tr class="odd_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
207 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
208 <td>Mozilla 1.1</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
209 <td>Win 95+ / OSX.1+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
210 <td class="center">1.1</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
211 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
212 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
213 <tr class="even_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
214 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
215 <td>Mozilla 1.2</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
216 <td>Win 95+ / OSX.1+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
217 <td class="center">1.2</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
218 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
219 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
220 <tr class="odd_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
221 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
222 <td>Mozilla 1.3</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
223 <td>Win 95+ / OSX.1+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
224 <td class="center">1.3</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
225 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
226 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
227 <tr class="even_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
228 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
229 <td>Mozilla 1.4</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
230 <td>Win 95+ / OSX.1+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
231 <td class="center">1.4</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
232 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
233 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
234 <tr class="odd_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
235 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
236 <td>Mozilla 1.5</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
237 <td>Win 95+ / OSX.1+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
238 <td class="center">1.5</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
239 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
240 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
241 <tr class="even_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
242 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
243 <td>Mozilla 1.6</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
244 <td>Win 95+ / OSX.1+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
245 <td class="center">1.6</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
246 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
247 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
248 <tr class="odd_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
249 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
250 <td>Mozilla 1.7</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
251 <td>Win 98+ / OSX.1+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
252 <td class="center">1.7</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
253 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
254 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
255 <tr class="even_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
256 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
257 <td>Mozilla 1.8</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
258 <td>Win 98+ / OSX.1+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
259 <td class="center">1.8</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
260 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
261 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
262 <tr class="odd_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
263 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
264 <td>Seamonkey 1.1</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
265 <td>Win 98+ / OSX.2+</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
266 <td class="center">1.8</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
267 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
268 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
269 <tr class="even_gradeA">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
270 <td>Gecko</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
271 <td>Epiphany 2.20</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
272 <td>Gnome</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
273 <td class="center">1.8</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
274 <td class="center">A</td>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
275 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
276 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
277 </table>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
278 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
279 </form>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
280 <div class="spacer"></div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
281
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
282
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
283 <h1>Examples</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
284 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
285 <li><a href="index.html">Basic initialisation</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
286 <li><a href="mouseover.html">Activate with a mouseover rather than click</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
287 <li><a href="text.html">Custom text in the button</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
288 <li><a href="theme.html">Using with jQuery UI ThemeRoller</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
289 <li><a href="exclude_columns.html">Excluding columns from the show / hide list</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
290 <li><a href="two_tables.html">Two tables initialised together - individual controls</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
291 <li><a href="two_tables_identical.html">Two tables initialised together - shared control</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
292 <li><a href="style.html">Alternative styling and reset to original</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
293 <li><a href="title_callback.html">Customisation of the button label with a callback</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
294 </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
295
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
296
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
297 <h1>Initialisation code</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
298 <pre>$(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
299 var oTables = $('table').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
300 "sDom": 'lfrtip'
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
301 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
302
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
303 var oColVis = new ColVis( oTables.fnSettings() );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
304 $(oColVis).bind('stateChange', function (e, data) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
305 var jqTables = $('table:not(#example)');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
306 for ( var i=0, iLen=jqTables.length ; i&lt;iLen ; i++ ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
307 $(jqTables[i]).dataTable().fnSetColumnVis( data.iColumn, data.bVisible );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
308 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
309 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
310
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
311 document.getElementById('buttonInsert').appendChild(oColVis.dom.wrapper);
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
312 oColVis.fnRebuild();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
313 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
314
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
315 <div id="footer" style="text-align:center;">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
316 <span style="font-size:10px;">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
317 ColVis and DataTables &copy; Allan Jardine 2009-2010
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
318 </span>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
319 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
320 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
321 </body>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
322 </html>