Subversion-Projekte lars-tiefland.faltradxxs.de

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
2 lars 1
<!DOCTYPE html>
2
<html>
3
<head>
4
	<meta charset="utf-8">
5
	<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
6
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
7
 
8
	<title>ColVis example - Two tables with individual controls</title>
9
	<link rel="stylesheet" type="text/css" href="../../../media/css/jquery.dataTables.css">
10
	<link rel="stylesheet" type="text/css" href="../css/dataTables.colVis.css">
11
	<link rel="stylesheet" type="text/css" href="../../../examples/resources/syntax/shCore.css">
12
	<link rel="stylesheet" type="text/css" href="../../../examples/resources/demo.css">
13
	<style type="text/css" class="init">
14
 
15
	</style>
16
	<script type="text/javascript" language="javascript" src="../../../media/js/jquery.js"></script>
17
	<script type="text/javascript" language="javascript" src="../../../media/js/jquery.dataTables.js"></script>
18
	<script type="text/javascript" language="javascript" src="../js/dataTables.colVis.js"></script>
19
	<script type="text/javascript" language="javascript" src="../../../examples/resources/syntax/shCore.js"></script>
20
	<script type="text/javascript" language="javascript" src="../../../examples/resources/demo.js"></script>
21
	<script type="text/javascript" language="javascript" class="init">
22
 
23
 
24
$(document).ready(function() {
25
	$('table.display').DataTable( {
26
		dom: 'C<"clear">lfrtip',
27
		displayLength: 5
28
	} );
29
} );
30
 
31
 
32
	</script>
33
</head>
34
 
35
<body class="dt-example">
36
	<div class="container">
37
		<section>
38
			<h1>ColVis example <span>Two tables with individual controls</span></h1>
39
 
40
			<div class="info">
41
				<p>It can be useful to have DataTables initialise more than one table with a single call can for them
42
				to each have individual ColVis controllers. All this requires is a suitable jQuery selector to be used,
43
				and DataTables and ColVis will take care of the rest - as shown in this example.</p>
44
			</div>
45
 
46
			<table id="" class="display" cellspacing="0" width="100%">
47
				<thead>
48
					<tr>
49
						<th>Name</th>
50
						<th>Position</th>
51
						<th>Office</th>
52
						<th>Age</th>
53
						<th>Salary</th>
54
					</tr>
55
				</thead>
56
 
57
				<tfoot>
58
					<tr>
59
						<th>Name</th>
60
						<th>Position</th>
61
						<th>Office</th>
62
						<th>Age</th>
63
						<th>Salary</th>
64
					</tr>
65
				</tfoot>
66
 
67
				<tbody>
68
					<tr>
69
						<td>Tiger Nixon</td>
70
						<td>System Architect</td>
71
						<td>Edinburgh</td>
72
						<td>61</td>
73
						<td>$320,800</td>
74
					</tr>
75
					<tr>
76
						<td>Cedric Kelly</td>
77
						<td>Senior Javascript Developer</td>
78
						<td>Edinburgh</td>
79
						<td>22</td>
80
						<td>$433,060</td>
81
					</tr>
82
					<tr>
83
						<td>Sonya Frost</td>
84
						<td>Software Engineer</td>
85
						<td>Edinburgh</td>
86
						<td>23</td>
87
						<td>$103,600</td>
88
					</tr>
89
					<tr>
90
						<td>Quinn Flynn</td>
91
						<td>Support Lead</td>
92
						<td>Edinburgh</td>
93
						<td>22</td>
94
						<td>$342,000</td>
95
					</tr>
96
					<tr>
97
						<td>Dai Rios</td>
98
						<td>Personnel Lead</td>
99
						<td>Edinburgh</td>
100
						<td>35</td>
101
						<td>$217,500</td>
102
					</tr>
103
					<tr>
104
						<td>Gavin Joyce</td>
105
						<td>Developer</td>
106
						<td>Edinburgh</td>
107
						<td>42</td>
108
						<td>$92,575</td>
109
					</tr>
110
					<tr>
111
						<td>Martena Mccray</td>
112
						<td>Post-Sales support</td>
113
						<td>Edinburgh</td>
114
						<td>46</td>
115
						<td>$324,050</td>
116
					</tr>
117
					<tr>
118
						<td>Jennifer Acosta</td>
119
						<td>Junior Javascript Developer</td>
120
						<td>Edinburgh</td>
121
						<td>43</td>
122
						<td>$75,650</td>
123
					</tr>
124
					<tr>
125
						<td>Shad Decker</td>
126
						<td>Regional Director</td>
127
						<td>Edinburgh</td>
128
						<td>51</td>
129
						<td>$183,000</td>
130
					</tr>
131
				</tbody>
132
			</table>
133
 
134
			<table id="" class="display" cellspacing="0" width="100%">
135
				<thead>
136
					<tr>
137
						<th>Name</th>
138
						<th>Position</th>
139
						<th>Office</th>
140
						<th>Age</th>
141
						<th>Salary</th>
142
					</tr>
143
				</thead>
144
 
145
				<tfoot>
146
					<tr>
147
						<th>Name</th>
148
						<th>Position</th>
149
						<th>Office</th>
150
						<th>Age</th>
151
						<th>Salary</th>
152
					</tr>
153
				</tfoot>
154
 
155
				<tbody>
156
					<tr>
157
						<td>Jena Gaines</td>
158
						<td>Office Manager</td>
159
						<td>London</td>
160
						<td>30</td>
161
						<td>$90,560</td>
162
					</tr>
163
					<tr>
164
						<td>Haley Kennedy</td>
165
						<td>Senior Marketing Designer</td>
166
						<td>London</td>
167
						<td>43</td>
168
						<td>$313,500</td>
169
					</tr>
170
					<tr>
171
						<td>Tatyana Fitzpatrick</td>
172
						<td>Regional Director</td>
173
						<td>London</td>
174
						<td>19</td>
175
						<td>$385,750</td>
176
					</tr>
177
					<tr>
178
						<td>Michael Silva</td>
179
						<td>Marketing Designer</td>
180
						<td>London</td>
181
						<td>66</td>
182
						<td>$198,500</td>
183
					</tr>
184
					<tr>
185
						<td>Bradley Greer</td>
186
						<td>Software Engineer</td>
187
						<td>London</td>
188
						<td>41</td>
189
						<td>$132,000</td>
190
					</tr>
191
					<tr>
192
						<td>Angelica Ramos</td>
193
						<td>Chief Executive Officer (CEO)</td>
194
						<td>London</td>
195
						<td>47</td>
196
						<td>$1,200,000</td>
197
					</tr>
198
					<tr>
199
						<td>Suki Burks</td>
200
						<td>Developer</td>
201
						<td>London</td>
202
						<td>53</td>
203
						<td>$114,500</td>
204
					</tr>
205
					<tr>
206
						<td>Prescott Bartlett</td>
207
						<td>Technical Author</td>
208
						<td>London</td>
209
						<td>27</td>
210
						<td>$145,000</td>
211
					</tr>
212
					<tr>
213
						<td>Timothy Mooney</td>
214
						<td>Office Manager</td>
215
						<td>London</td>
216
						<td>37</td>
217
						<td>$136,200</td>
218
					</tr>
219
					<tr>
220
						<td>Bruno Nash</td>
221
						<td>Software Engineer</td>
222
						<td>London</td>
223
						<td>38</td>
224
						<td>$163,500</td>
225
					</tr>
226
					<tr>
227
						<td>Hermione Butler</td>
228
						<td>Regional Director</td>
229
						<td>London</td>
230
						<td>47</td>
231
						<td>$356,250</td>
232
					</tr>
233
					<tr>
234
						<td>Lael Greer</td>
235
						<td>Systems Administrator</td>
236
						<td>London</td>
237
						<td>21</td>
238
						<td>$103,500</td>
239
					</tr>
240
				</tbody>
241
			</table>
242
 
243
			<ul class="tabs">
244
				<li class="active">Javascript</li>
245
				<li>HTML</li>
246
				<li>CSS</li>
247
				<li>Ajax</li>
248
				<li>Server-side script</li>
249
			</ul>
250
 
251
			<div class="tabs">
252
				<div class="js">
253
					<p>The Javascript shown below is used to initialise the table shown in this
254
					example:</p><code class="multiline brush: js;">$(document).ready(function() {
255
	$('table.display').DataTable( {
256
		dom: 'C&lt;&quot;clear&quot;&gt;lfrtip',
257
		displayLength: 5
258
	} );
259
} );</code>
260
 
261
					<p>In addition to the above code, the following Javascript library files are loaded for use in this
262
					example:</p>
263
 
264
					<ul>
265
						<li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
266
						<li><a href=
267
						"../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
268
						<li><a href="../js/dataTables.colVis.js">../js/dataTables.colVis.js</a></li>
269
					</ul>
270
				</div>
271
 
272
				<div class="table">
273
					<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
274
					DataTables:</p>
275
				</div>
276
 
277
				<div class="css">
278
					<div>
279
						<p>This example uses a little bit of additional CSS beyond what is loaded from the library
280
						files (below), in order to correctly display the table. The additional CSS used is shown
281
						below:</p><code class="multiline brush: js;"></code>
282
					</div>
283
 
284
					<p>The following CSS library files are loaded for use in this example to provide the styling of the
285
					table:</p>
286
 
287
					<ul>
288
						<li><a href=
289
						"../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
290
						<li><a href="../css/dataTables.colVis.css">../css/dataTables.colVis.css</a></li>
291
					</ul>
292
				</div>
293
 
294
				<div class="ajax">
295
					<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
296
					will update automatically as any additional data is loaded.</p>
297
				</div>
298
 
299
				<div class="php">
300
					<p>The script used to perform the server-side processing for this table is shown below. Please note
301
					that this is just an example script using PHP. Server-side processing scripts can be written in any
302
					language, using <a href="//datatables.net/manual/server-side">the protocol described in the
303
					DataTables documentation</a>.</p>
304
				</div>
305
			</div>
306
		</section>
307
	</div>
308
 
309
	<section>
310
		<div class="footer">
311
			<div class="gradient"></div>
312
 
313
			<div class="liner">
314
				<h2>Other examples</h2>
315
 
316
				<div class="toc">
317
					<div class="toc-group">
318
						<h3><a href="./index.html">Examples</a></h3>
319
						<ul class="toc active">
320
							<li><a href="./simple.html">Basic initialisation</a></li>
321
							<li><a href="./new_init.html">`new` initialisation</a></li>
322
							<li><a href="./text.html">Custom button text</a></li>
323
							<li><a href="./exclude_columns.html">Exclude columns from list</a></li>
324
							<li><a href="./title_callback.html">Column button callback</a></li>
325
							<li><a href="./button_order.html">Button ordering</a></li>
326
							<li><a href="./mouseover.html">Mouseover activation</a></li>
327
							<li><a href="./group_columns.html">Group columns</a></li>
328
							<li class="active"><a href="./two_tables.html">Two tables with individual controls</a></li>
329
							<li><a href="./two_tables_identical.html">Two tables with shared controls</a></li>
330
							<li><a href="./restore.html">Restore / show all</a></li>
331
							<li><a href="./jqueryui.html">jQuery UI styling</a></li>
332
						</ul>
333
					</div>
334
				</div>
335
 
336
				<div class="epilogue">
337
					<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
338
					information about its API properties and methods.<br>
339
					Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
340
					<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
341
					DataTables.</p>
342
 
343
					<p class="copyright">DataTables designed and created by <a href=
344
					"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
345
					DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
346
				</div>
347
			</div>
348
		</div>
349
	</section>
350
</body>
351
</html>