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 - z-index order control
</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">
15 div.dataTables_wrapper {
20 <script type=
"text/javascript" language=
"javascript" src=
"../../../media/js/jquery.js"></script>
21 <script type=
"text/javascript" language=
"javascript" src=
"../../../media/js/jquery.dataTables.js"></script>
22 <script type=
"text/javascript" language=
"javascript" src=
"../js/dataTables.fixedHeader.js"></script>
23 <script type=
"text/javascript" language=
"javascript" src=
"../../../examples/resources/syntax/shCore.js"></script>
24 <script type=
"text/javascript" language=
"javascript" src=
"../../../examples/resources/demo.js"></script>
25 <script type=
"text/javascript" language=
"javascript" class=
"init">
28 $(document).ready(function() {
29 var table = $('#example').DataTable();
31 new $.fn.dataTable.FixedHeader( table, {
41 <body class=
"dt-example">
42 <div class=
"container">
44 <h1>FixedHeader example
<span>z-index order control
</span></h1>
47 <p>When you have two or more columns fixed on a table, there might be occasions when you which to have
48 one column floating on top of another. This example shows how you can do that with the initialisation
49 parameters
<code>zTop
</code>,
<code>zBottom
</code>,
<code>zLeft
</code> and
<code>zRight
</code>. In this
50 example the left column is set to float on top of the header. The difference is subtle, but can be
53 <p>The default zIndexes are:
</p>
56 <li><code>zTop
</code>:
104</li>
57 <li><code>zBottom
</code>:
103</li>
58 <li><code>zLeft
</code>:
102</li>
59 <li><code>zRight
</code>:
101</li>
62 <p>This example shows the left column being floated on top of the header.
</p>
65 <table id=
"example" class=
"stripe row-border order-column" cellspacing=
"0" width=
"100%">
91 <td>System Architect
</td>
98 <td>Garrett Winters
</td>
107 <td>Junior Technical Author
</td>
108 <td>San Francisco
</td>
114 <td>Cedric Kelly
</td>
115 <td>Senior Javascript Developer
</td>
130 <td>Brielle Williamson
</td>
131 <td>Integration Specialist
</td>
138 <td>Herrod Chandler
</td>
139 <td>Sales Assistant
</td>
140 <td>San Francisco
</td>
146 <td>Rhona Davidson
</td>
147 <td>Integration Specialist
</td>
154 <td>Colleen Hurst
</td>
155 <td>Javascript Developer
</td>
156 <td>San Francisco
</td>
163 <td>Software Engineer
</td>
171 <td>Office Manager
</td>
179 <td>Support Lead
</td>
186 <td>Charde Marshall
</td>
187 <td>Regional Director
</td>
188 <td>San Francisco
</td>
194 <td>Haley Kennedy
</td>
195 <td>Senior Marketing Designer
</td>
202 <td>Tatyana Fitzpatrick
</td>
203 <td>Regional Director
</td>
210 <td>Michael Silva
</td>
211 <td>Marketing Designer
</td>
219 <td>Chief Financial Officer (CFO)
</td>
226 <td>Gloria Little
</td>
227 <td>Systems Administrator
</td>
234 <td>Bradley Greer
</td>
235 <td>Software Engineer
</td>
243 <td>Personnel Lead
</td>
250 <td>Jenette Caldwell
</td>
251 <td>Development Lead
</td>
259 <td>Chief Marketing Officer (CMO)
</td>
266 <td>Caesar Vance
</td>
267 <td>Pre-Sales Support
</td>
274 <td>Doris Wilder
</td>
275 <td>Sales Assistant
</td>
282 <td>Angelica Ramos
</td>
283 <td>Chief Executive Officer (CEO)
</td>
298 <td>Jennifer Chang
</td>
299 <td>Regional Director
</td>
306 <td>Brenden Wagner
</td>
307 <td>Software Engineer
</td>
308 <td>San Francisco
</td>
315 <td>Chief Operating Officer (COO)
</td>
316 <td>San Francisco
</td>
323 <td>Regional Marketing
</td>
330 <td>Michelle House
</td>
331 <td>Integration Specialist
</td>
346 <td>Prescott Bartlett
</td>
347 <td>Technical Author
</td>
354 <td>Gavin Cortez
</td>
356 <td>San Francisco
</td>
362 <td>Martena Mccray
</td>
363 <td>Post-Sales support
</td>
370 <td>Unity Butler
</td>
371 <td>Marketing Designer
</td>
372 <td>San Francisco
</td>
378 <td>Howard Hatfield
</td>
379 <td>Office Manager
</td>
380 <td>San Francisco
</td>
386 <td>Hope Fuentes
</td>
388 <td>San Francisco
</td>
394 <td>Vivian Harrell
</td>
395 <td>Financial Controller
</td>
396 <td>San Francisco
</td>
402 <td>Timothy Mooney
</td>
403 <td>Office Manager
</td>
410 <td>Jackson Bradshaw
</td>
418 <td>Olivia Liang
</td>
419 <td>Support Engineer
</td>
427 <td>Software Engineer
</td>
434 <td>Sakura Yamamoto
</td>
435 <td>Support Engineer
</td>
450 <td>Finn Camacho
</td>
451 <td>Support Engineer
</td>
452 <td>San Francisco
</td>
458 <td>Serge Baldwin
</td>
459 <td>Data Coordinator
</td>
466 <td>Zenaida Frank
</td>
467 <td>Software Engineer
</td>
474 <td>Zorita Serrano
</td>
475 <td>Software Engineer
</td>
476 <td>San Francisco
</td>
482 <td>Jennifer Acosta
</td>
483 <td>Junior Javascript Developer
</td>
490 <td>Cara Stevens
</td>
491 <td>Sales Assistant
</td>
498 <td>Hermione Butler
</td>
499 <td>Regional Director
</td>
507 <td>Systems Administrator
</td>
514 <td>Jonas Alexander
</td>
516 <td>San Francisco
</td>
523 <td>Regional Director
</td>
530 <td>Michael Bruce
</td>
531 <td>Javascript Developer
</td>
538 <td>Donna Snider
</td>
539 <td>Customer Support
</td>
549 <li class=
"active">Javascript
</li>
553 <li>Server-side script
</li>
558 <p>The Javascript shown below is used to initialise the table shown in this
559 example:
</p><code class=
"multiline brush: js;">$(document).ready(function() {
560 var table = $('#example').DataTable();
562 new $.fn.dataTable.FixedHeader( table, {
568 <p>In addition to the above code, the following Javascript library files are loaded for use in this
572 <li><a href=
"../../../media/js/jquery.js">../../../media/js/jquery.js
</a></li>
574 "../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js
</a></li>
575 <li><a href=
"../js/dataTables.fixedHeader.js">../js/dataTables.fixedHeader.js
</a></li>
580 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by
586 <p>This example uses a little bit of additional CSS beyond what is loaded from the library
587 files (below), in order to correctly display the table. The additional CSS used is shown
588 below:
</p><code class=
"multiline brush: js;">div.dataTables_wrapper {
593 <p>The following CSS library files are loaded for use in this example to provide the styling of the
598 "../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css
</a></li>
599 <li><a href=
"../css/dataTables.fixedHeader.css">../css/dataTables.fixedHeader.css
</a></li>
604 <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
605 will update automatically as any additional data is loaded.
</p>
609 <p>The script used to perform the server-side processing for this table is shown below. Please note
610 that this is just an example script using PHP. Server-side processing scripts can be written in any
611 language, using
<a href=
"//datatables.net/manual/server-side">the protocol described in the
612 DataTables documentation
</a>.
</p>
620 <div class=
"gradient"></div>
623 <h2>Other examples
</h2>
626 <div class=
"toc-group">
627 <h3><a href=
"./index.html">Examples
</a></h3>
628 <ul class=
"toc active">
629 <li><a href=
"./simple.html">Basic initialisation
</a></li>
630 <li><a href=
"./header_footer.html">Header and footer fixed
</a></li>
631 <li><a href=
"./top_left_right.html">Header, left and right all fixed
</a></li>
632 <li><a href=
"./two_tables.html">Multiple tables
</a></li>
633 <li class=
"active"><a href=
"./zIndexes.html">z-index order control
</a></li>
638 <div class=
"epilogue">
639 <p>Please refer to the
<a href=
"http://www.datatables.net">DataTables documentation
</a> for full
640 information about its API properties and methods.
<br>
641 Additionally, there are a wide range of
<a href=
"http://www.datatables.net/extras">extras
</a> and
642 <a href=
"http://www.datatables.net/plug-ins">plug-ins
</a> which extend the capabilities of
645 <p class=
"copyright">DataTables designed and created by
<a href=
646 "http://www.sprymedia.co.uk">SpryMedia Ltd
</a> © 2007-
2014<br>
647 DataTables is licensed under the
<a href=
"http://www.datatables.net/mit">MIT license
</a>.
</p>