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>Responsive example - Whole row child row 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.responsive.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.responsive.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">
25 $(document).ready(function() {
26 $('#example').DataTable( {
47 <body class=
"dt-example">
48 <div class=
"container">
50 <h1>Responsive example
<span>Whole row child row control
</span></h1>
53 <p>When using the
<code>column
</code> details type in Responsive the
<a href=
54 "//datatables.net/extensions/responsive/reference/option/responsive.details.target"><code class=
"option" title=
55 "Responsive initialisation option">responsive.details.target
<span>R
</span></code></a> option provides the ability to control what element is used to show / hide
56 the child rows when the table is collapsed.
</p>
58 <p>This example uses the
<code>tr
</code> selector to have the whole row act as the control.
</p>
61 <table id=
"example" class=
"display nowrap" cellspacing=
"0" width=
"100%">
95 <td>System Architect
</td>
117 <td>Junior Technical Author
</td>
118 <td>San Francisco
</td>
128 <td>Senior Javascript Developer
</td>
150 <td>Integration Specialist
</td>
161 <td>Sales Assistant
</td>
162 <td>San Francisco
</td>
172 <td>Integration Specialist
</td>
183 <td>Javascript Developer
</td>
184 <td>San Francisco
</td>
194 <td>Software Engineer
</td>
205 <td>Office Manager
</td>
216 <td>Support Lead
</td>
227 <td>Regional Director
</td>
228 <td>San Francisco
</td>
238 <td>Senior Marketing Designer
</td>
249 <td>Regional Director
</td>
260 <td>Marketing Designer
</td>
271 <td>Chief Financial Officer (CFO)
</td>
282 <td>Systems Administrator
</td>
293 <td>Software Engineer
</td>
304 <td>Personnel Lead
</td>
315 <td>Development Lead
</td>
326 <td>Chief Marketing Officer (CMO)
</td>
337 <td>Pre-Sales Support
</td>
348 <td>Sales Assistant
</td>
359 <td>Chief Executive Officer (CEO)
</td>
381 <td>Regional Director
</td>
392 <td>Software Engineer
</td>
393 <td>San Francisco
</td>
403 <td>Chief Operating Officer (COO)
</td>
404 <td>San Francisco
</td>
414 <td>Regional Marketing
</td>
425 <td>Integration Specialist
</td>
447 <td>Technical Author
</td>
459 <td>San Francisco
</td>
469 <td>Post-Sales support
</td>
480 <td>Marketing Designer
</td>
481 <td>San Francisco
</td>
491 <td>Office Manager
</td>
492 <td>San Francisco
</td>
503 <td>San Francisco
</td>
513 <td>Financial Controller
</td>
514 <td>San Francisco
</td>
524 <td>Office Manager
</td>
546 <td>Support Engineer
</td>
557 <td>Software Engineer
</td>
568 <td>Support Engineer
</td>
590 <td>Support Engineer
</td>
591 <td>San Francisco
</td>
601 <td>Data Coordinator
</td>
612 <td>Software Engineer
</td>
623 <td>Software Engineer
</td>
624 <td>San Francisco
</td>
634 <td>Junior Javascript Developer
</td>
645 <td>Sales Assistant
</td>
656 <td>Regional Director
</td>
667 <td>Systems Administrator
</td>
679 <td>San Francisco
</td>
689 <td>Regional Director
</td>
700 <td>Javascript Developer
</td>
711 <td>Customer Support
</td>
722 <li class=
"active">Javascript
</li>
726 <li>Server-side script
</li>
731 <p>The Javascript shown below is used to initialise the table shown in this example:
</p><code class=
"multiline language-js">$(document).ready(function() {
732 $('#example').DataTable( {
740 className: 'control',
748 <p>In addition to the above code, the following Javascript library files are loaded for use in this example:
</p>
751 <li><a href=
"../../../../media/js/jquery.js">../../../../media/js/jquery.js
</a></li>
752 <li><a href=
"../../../../media/js/jquery.dataTables.js">../../../../media/js/jquery.dataTables.js
</a></li>
753 <li><a href=
"../../js/dataTables.responsive.js">../../js/dataTables.responsive.js
</a></li>
758 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:
</p>
763 <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
764 additional CSS used is shown below:
</p><code class=
"multiline language-css"></code>
767 <p>The following CSS library files are loaded for use in this example to provide the styling of the table:
</p>
770 <li><a href=
"../../../../media/css/jquery.dataTables.css">../../../../media/css/jquery.dataTables.css
</a></li>
771 <li><a href=
"../../css/dataTables.responsive.css">../../css/dataTables.responsive.css
</a></li>
776 <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
781 <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
782 processing scripts can be written in any language, using
<a href=
"//datatables.net/manual/server-side">the protocol described in the DataTables
783 documentation
</a>.
</p>
791 <div class=
"gradient"></div>
794 <h2>Other examples
</h2>
797 <div class=
"toc-group">
798 <h3><a href=
"../initialisation/index.html">Basic initialisation
</a></h3>
800 <li><a href=
"../initialisation/className.html">Class name
</a></li>
801 <li><a href=
"../initialisation/option.html">Configuration option
</a></li>
802 <li><a href=
"../initialisation/new.html">`new` constructor
</a></li>
803 <li><a href=
"../initialisation/ajax.html">Ajax data
</a></li>
804 <li><a href=
"../initialisation/default.html">Default initialisation
</a></li>
808 <div class=
"toc-group">
809 <h3><a href=
"../styling/index.html">Styling
</a></h3>
811 <li><a href=
"../styling/bootstrap.html">Bootstrap styling
</a></li>
812 <li><a href=
"../styling/foundation.html">Foundation styling
</a></li>
813 <li><a href=
"../styling/scrolling.html">Vertical scrolling
</a></li>
814 <li><a href=
"../styling/compact.html">Compact styling
</a></li>
818 <div class=
"toc-group">
819 <h3><a href=
"../display-control/index.html">Display control
</a></h3>
821 <li><a href=
"../display-control/auto.html">Automatic column hiding
</a></li>
822 <li><a href=
"../display-control/classes.html">Class control
</a></li>
823 <li><a href=
"../display-control/init-classes.html">Assigned class control
</a></li>
824 <li><a href=
"../display-control/fixedHeader.html">With FixedHeader
</a></li>
825 <li><a href=
"../display-control/complexHeader.html">Complex headers (rowspan / colspan)
</a></li>
829 <div class=
"toc-group">
830 <h3><a href=
"./index.html">Child rows
</a></h3>
831 <ul class=
"toc active">
832 <li><a href=
"./disable-child-rows.html">Disable child rows
</a></li>
833 <li><a href=
"./column-control.html">Column controlled child rows
</a></li>
834 <li><a href=
"./right-column.html">Column control - right
</a></li>
835 <li class=
"active"><a href=
"./whole-row-control.html">Whole row child row control
</a></li>
836 <li><a href=
"./custom-renderer.html">Custom child row renderer
</a></li>
841 <div class=
"epilogue">
842 <p>Please refer to the
<a href=
"http://www.datatables.net">DataTables documentation
</a> for full information about its API properties and methods.
<br>
843 Additionally, there are a wide range of
<a href=
"http://www.datatables.net/extras">extras
</a> and
<a href=
"http://www.datatables.net/plug-ins">plug-ins
</a>
844 which extend the capabilities of DataTables.
</p>
846 <p class=
"copyright">DataTables designed and created by
<a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd
</a> © 2007-
2015<br>
847 DataTables is licensed under the
<a href=
"http://www.datatables.net/mit">MIT license
</a>.
</p>