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">
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/dataTables.fixedHeader.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">
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.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">
24 $(document).ready(function() {
25 var t1 = $('table.display').eq(0).DataTable();
26 new $.fn.dataTable.FixedHeader( t1, {
30 var t2 = $('table.display').eq(1).DataTable();
31 new $.fn.dataTable.FixedHeader( t2, {
40 <body class="dt-example">
41 <div class="container">
43 <h1>FixedHeader example <span>Multiple tables</span></h1>
46 <p>The following example shows two DataTables enhanced tables both with FixedHeader enabled on them.
47 This is done simply by initialising FixedHeader on each table. This example also shows the footer being
48 fixed in place for the two tables.</p>
51 <table id="" class="display" cellspacing="0" width="100%">
75 <td>System Architect</td>
82 <td>Senior Javascript Developer</td>
89 <td>Software Engineer</td>
103 <td>Personnel Lead</td>
116 <td>Martena Mccray</td>
117 <td>Post-Sales support</td>
123 <td>Jennifer Acosta</td>
124 <td>Junior Javascript Developer</td>
131 <td>Regional Director</td>
139 <table id="" class="display" cellspacing="0" width="100%">
163 <td>Office Manager</td>
169 <td>Haley Kennedy</td>
170 <td>Senior Marketing Designer</td>
176 <td>Tatyana Fitzpatrick</td>
177 <td>Regional Director</td>
183 <td>Michael Silva</td>
184 <td>Marketing Designer</td>
190 <td>Bradley Greer</td>
191 <td>Software Engineer</td>
197 <td>Angelica Ramos</td>
198 <td>Chief Executive Officer (CEO)</td>
211 <td>Prescott Bartlett</td>
212 <td>Technical Author</td>
218 <td>Timothy Mooney</td>
219 <td>Office Manager</td>
226 <td>Software Engineer</td>
232 <td>Hermione Butler</td>
233 <td>Regional Director</td>
240 <td>Systems Administrator</td>
249 <li class="active">Javascript</li>
253 <li>Server-side script</li>
258 <p>The Javascript shown below is used to initialise the table shown in this
259 example:</p><code class="multiline brush: js;">$(document).ready(function() {
260 var t1 = $('table.display').eq(0).DataTable();
261 new $.fn.dataTable.FixedHeader( t1, {
265 var t2 = $('table.display').eq(1).DataTable();
266 new $.fn.dataTable.FixedHeader( t2, {
271 <p>In addition to the above code, the following Javascript library files are loaded for use in this
275 <li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
277 "../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
278 <li><a href="../js/dataTables.fixedHeader.js">../js/dataTables.fixedHeader.js</a></li>
283 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by
289 <p>This example uses a little bit of additional CSS beyond what is loaded from the library
290 files (below), in order to correctly display the table. The additional CSS used is shown
291 below:</p><code class="multiline brush: js;"></code>
294 <p>The following CSS library files are loaded for use in this example to provide the styling of the
299 "../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
300 <li><a href="../css/dataTables.fixedHeader.css">../css/dataTables.fixedHeader.css</a></li>
305 <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
306 will update automatically as any additional data is loaded.</p>
310 <p>The script used to perform the server-side processing for this table is shown below. Please note
311 that this is just an example script using PHP. Server-side processing scripts can be written in any
312 language, using <a href="//datatables.net/manual/server-side">the protocol described in the
313 DataTables documentation</a>.</p>
321 <div class="gradient"></div>
324 <h2>Other examples</h2>
327 <div class="toc-group">
328 <h3><a href="./index.html">Examples</a></h3>
329 <ul class="toc active">
330 <li><a href="./simple.html">Basic initialisation</a></li>
331 <li><a href="./header_footer.html">Header and footer fixed</a></li>
332 <li><a href="./top_left_right.html">Header, left and right all fixed</a></li>
333 <li class="active"><a href="./two_tables.html">Multiple tables</a></li>
334 <li><a href="./zIndexes.html">z-index order control</a></li>
339 <div class="epilogue">
340 <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
341 information about its API properties and methods.<br>
342 Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
343 <a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
346 <p class="copyright">DataTables designed and created by <a href=
347 "http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2014<br>
348 DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>