Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
875 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>FixedHeader example - Multiple tables</title>
9
	<link rel="stylesheet" type="text/css" href="../../../../media/css/jquery.dataTables.css">
10
	<link rel="stylesheet" type="text/css" href="../../css/fixedHeader.datatables.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="//code.jquery.com/jquery-1.11.3.min.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.fixedHeader.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
		fixedHeader: {
27
			header: true,
28
			footer: true
29
		}
30
	} );
31
} );
32
 
33
 
34
	</script>
35
</head>
36
 
37
<body class="dt-example">
38
	<div class="container">
39
		<section>
40
			<h1>FixedHeader example <span>Multiple tables</span></h1>
41
 
42
			<div class="info">
43
				<p>The following example shows two DataTables enhanced tables both with FixedHeader enabled on them. This is done quite simply by initialising DataTables on both
44
				tables with the <a href="//datatables.net/reference/option/fixedHeader"><code class="option" title="FixedHeader initialisation option">fixedHeader</code></a>
45
				option set.</p>
46
 
47
				<p>This example also shows the footer being fixed in place for the two tables.</p>
48
			</div>
49
 
50
			<table id="" class="display" cellspacing="0" width="100%">
51
				<thead>
52
					<tr>
53
						<th>Name</th>
54
						<th>Position</th>
55
						<th>Office</th>
56
						<th>Age</th>
57
						<th>Salary</th>
58
					</tr>
59
				</thead>
60
 
61
				<tfoot>
62
					<tr>
63
						<th>Name</th>
64
						<th>Position</th>
65
						<th>Office</th>
66
						<th>Age</th>
67
						<th>Salary</th>
68
					</tr>
69
				</tfoot>
70
 
71
				<tbody>
72
					<tr>
73
						<td>Tiger Nixon</td>
74
						<td>System Architect</td>
75
						<td>Edinburgh</td>
76
						<td>61</td>
77
						<td>$320,800</td>
78
					</tr>
79
					<tr>
80
						<td>Cedric Kelly</td>
81
						<td>Senior Javascript Developer</td>
82
						<td>Edinburgh</td>
83
						<td>22</td>
84
						<td>$433,060</td>
85
					</tr>
86
					<tr>
87
						<td>Sonya Frost</td>
88
						<td>Software Engineer</td>
89
						<td>Edinburgh</td>
90
						<td>23</td>
91
						<td>$103,600</td>
92
					</tr>
93
					<tr>
94
						<td>Quinn Flynn</td>
95
						<td>Support Lead</td>
96
						<td>Edinburgh</td>
97
						<td>22</td>
98
						<td>$342,000</td>
99
					</tr>
100
					<tr>
101
						<td>Dai Rios</td>
102
						<td>Personnel Lead</td>
103
						<td>Edinburgh</td>
104
						<td>35</td>
105
						<td>$217,500</td>
106
					</tr>
107
					<tr>
108
						<td>Gavin Joyce</td>
109
						<td>Developer</td>
110
						<td>Edinburgh</td>
111
						<td>42</td>
112
						<td>$92,575</td>
113
					</tr>
114
					<tr>
115
						<td>Martena Mccray</td>
116
						<td>Post-Sales support</td>
117
						<td>Edinburgh</td>
118
						<td>46</td>
119
						<td>$324,050</td>
120
					</tr>
121
					<tr>
122
						<td>Jennifer Acosta</td>
123
						<td>Junior Javascript Developer</td>
124
						<td>Edinburgh</td>
125
						<td>43</td>
126
						<td>$75,650</td>
127
					</tr>
128
					<tr>
129
						<td>Shad Decker</td>
130
						<td>Regional Director</td>
131
						<td>Edinburgh</td>
132
						<td>51</td>
133
						<td>$183,000</td>
134
					</tr>
135
				</tbody>
136
			</table>
137
 
138
			<table id="" class="display" cellspacing="0" width="100%">
139
				<thead>
140
					<tr>
141
						<th>Name</th>
142
						<th>Position</th>
143
						<th>Office</th>
144
						<th>Age</th>
145
						<th>Salary</th>
146
					</tr>
147
				</thead>
148
 
149
				<tfoot>
150
					<tr>
151
						<th>Name</th>
152
						<th>Position</th>
153
						<th>Office</th>
154
						<th>Age</th>
155
						<th>Salary</th>
156
					</tr>
157
				</tfoot>
158
 
159
				<tbody>
160
					<tr>
161
						<td>Jena Gaines</td>
162
						<td>Office Manager</td>
163
						<td>London</td>
164
						<td>30</td>
165
						<td>$90,560</td>
166
					</tr>
167
					<tr>
168
						<td>Haley Kennedy</td>
169
						<td>Senior Marketing Designer</td>
170
						<td>London</td>
171
						<td>43</td>
172
						<td>$313,500</td>
173
					</tr>
174
					<tr>
175
						<td>Tatyana Fitzpatrick</td>
176
						<td>Regional Director</td>
177
						<td>London</td>
178
						<td>19</td>
179
						<td>$385,750</td>
180
					</tr>
181
					<tr>
182
						<td>Michael Silva</td>
183
						<td>Marketing Designer</td>
184
						<td>London</td>
185
						<td>66</td>
186
						<td>$198,500</td>
187
					</tr>
188
					<tr>
189
						<td>Bradley Greer</td>
190
						<td>Software Engineer</td>
191
						<td>London</td>
192
						<td>41</td>
193
						<td>$132,000</td>
194
					</tr>
195
					<tr>
196
						<td>Angelica Ramos</td>
197
						<td>Chief Executive Officer (CEO)</td>
198
						<td>London</td>
199
						<td>47</td>
200
						<td>$1,200,000</td>
201
					</tr>
202
					<tr>
203
						<td>Suki Burks</td>
204
						<td>Developer</td>
205
						<td>London</td>
206
						<td>53</td>
207
						<td>$114,500</td>
208
					</tr>
209
					<tr>
210
						<td>Prescott Bartlett</td>
211
						<td>Technical Author</td>
212
						<td>London</td>
213
						<td>27</td>
214
						<td>$145,000</td>
215
					</tr>
216
					<tr>
217
						<td>Timothy Mooney</td>
218
						<td>Office Manager</td>
219
						<td>London</td>
220
						<td>37</td>
221
						<td>$136,200</td>
222
					</tr>
223
					<tr>
224
						<td>Bruno Nash</td>
225
						<td>Software Engineer</td>
226
						<td>London</td>
227
						<td>38</td>
228
						<td>$163,500</td>
229
					</tr>
230
					<tr>
231
						<td>Hermione Butler</td>
232
						<td>Regional Director</td>
233
						<td>London</td>
234
						<td>47</td>
235
						<td>$356,250</td>
236
					</tr>
237
					<tr>
238
						<td>Lael Greer</td>
239
						<td>Systems Administrator</td>
240
						<td>London</td>
241
						<td>21</td>
242
						<td>$103,500</td>
243
					</tr>
244
				</tbody>
245
			</table>
246
 
247
			<ul class="tabs">
248
				<li class="active">Javascript</li>
249
				<li>HTML</li>
250
				<li>CSS</li>
251
				<li>Ajax</li>
252
				<li>Server-side script</li>
253
			</ul>
254
 
255
			<div class="tabs">
256
				<div class="js">
257
					<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
258
	$('table.display').DataTable( {
259
		fixedHeader: {
260
			header: true,
261
			footer: true
262
		}
263
	} );
264
} );</code>
265
 
266
					<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
267
 
268
					<ul>
269
						<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.js</a></li>
270
						<li><a href="../../../../media/js/jquery.dataTables.js">../../../../media/js/jquery.dataTables.js</a></li>
271
						<li><a href="../../js/dataTables.fixedHeader.js">../../js/dataTables.fixedHeader.js</a></li>
272
					</ul>
273
				</div>
274
 
275
				<div class="table">
276
					<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
277
				</div>
278
 
279
				<div class="css">
280
					<div>
281
						<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
282
						additional CSS used is shown below:</p><code class="multiline language-css"></code>
283
					</div>
284
 
285
					<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
286
 
287
					<ul>
288
						<li><a href="../../../../media/css/jquery.dataTables.css">../../../../media/css/jquery.dataTables.css</a></li>
289
						<li><a href="../../css/fixedHeader.datatables.css">../../css/fixedHeader.datatables.css</a></li>
290
					</ul>
291
				</div>
292
 
293
				<div class="ajax">
294
					<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
295
					loaded.</p>
296
				</div>
297
 
298
				<div class="php">
299
					<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
300
					processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
301
					documentation</a>.</p>
302
				</div>
303
			</div>
304
		</section>
305
	</div>
306
 
307
	<section>
308
		<div class="footer">
309
			<div class="gradient"></div>
310
 
311
			<div class="liner">
312
				<h2>Other examples</h2>
313
 
314
				<div class="toc">
315
					<div class="toc-group">
316
						<h3><a href="./index.html">Initialisation and options</a></h3>
317
						<ul class="toc active">
318
							<li><a href="./simple.html">Basic initialisation</a></li>
319
							<li><a href="./header_footer.html">Header and footer fixed</a></li>
320
							<li class="active"><a href="./two_tables.html">Multiple tables</a></li>
321
							<li><a href="./offset.html">Offset</a></li>
322
							<li><a href="./enable-disable.html">Enable / disable FixedHeader</a></li>
323
							<li><a href="./new.html">Alternative initialisation</a></li>
324
						</ul>
325
					</div>
326
 
327
					<div class="toc-group">
328
						<h3><a href="../styling/index.html">Styling</a></h3>
329
						<ul class="toc">
330
							<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
331
							<li><a href="../styling/foundation.html">Foundation</a></li>
332
							<li><a href="../styling/jqueryui.html">jQuery UI styling</a></li>
333
						</ul>
334
					</div>
335
 
336
					<div class="toc-group">
337
						<h3><a href="../integration/index.html">Integration with other DataTables extensions</a></h3>
338
						<ul class="toc">
339
							<li><a href="../integration/responsive.html">Responsive integration</a></li>
340
							<li><a href="../integration/colreorder.html">ColReorder integration</a></li>
341
						</ul>
342
					</div>
343
				</div>
344
 
345
				<div class="epilogue">
346
					<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
347
					Additionally, there are a wide range of <a href="http://www.datatables.net/extensions">extensions</a> and <a href=
348
					"http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of DataTables.</p>
349
 
350
					<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
351
					DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
352
				</div>
353
			</div>
354
		</div>
355
	</section>
356
</body>
357
</html>