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 - Column control - right</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( {
46 <body class="dt-example">
47 <div class="container">
49 <h1>Responsive example <span>Column control - right</span></h1>
52 <p>When using the <code>column</code> child row control type, Responsive has the ability to use any column or element as the show / hide control for the row
53 details. This is provided through the <a href="//datatables.net/extensions/responsive/reference/option/responsive.details.target"><code class="option" title=
54 "Responsive initialisation option">responsive.details.target<span>R</span></code></a> option, which can be either a column index, or a jQuery selector.</p>
56 <p>This example shows the last column in the table being used as the control column.</p>
59 <table id="example" class="display nowrap" cellspacing="0" width="100%">
92 <td>System Architect</td>
114 <td>Junior Technical Author</td>
115 <td>San Francisco</td>
125 <td>Senior Javascript Developer</td>
147 <td>Integration Specialist</td>
158 <td>Sales Assistant</td>
159 <td>San Francisco</td>
169 <td>Integration Specialist</td>
180 <td>Javascript Developer</td>
181 <td>San Francisco</td>
191 <td>Software Engineer</td>
202 <td>Office Manager</td>
213 <td>Support Lead</td>
224 <td>Regional Director</td>
225 <td>San Francisco</td>
235 <td>Senior Marketing Designer</td>
246 <td>Regional Director</td>
257 <td>Marketing Designer</td>
268 <td>Chief Financial Officer (CFO)</td>
279 <td>Systems Administrator</td>
290 <td>Software Engineer</td>
301 <td>Personnel Lead</td>
312 <td>Development Lead</td>
323 <td>Chief Marketing Officer (CMO)</td>
334 <td>Pre-Sales Support</td>
345 <td>Sales Assistant</td>
356 <td>Chief Executive Officer (CEO)</td>
378 <td>Regional Director</td>
389 <td>Software Engineer</td>
390 <td>San Francisco</td>
400 <td>Chief Operating Officer (COO)</td>
401 <td>San Francisco</td>
411 <td>Regional Marketing</td>
422 <td>Integration Specialist</td>
444 <td>Technical Author</td>
456 <td>San Francisco</td>
466 <td>Post-Sales support</td>
477 <td>Marketing Designer</td>
478 <td>San Francisco</td>
488 <td>Office Manager</td>
489 <td>San Francisco</td>
500 <td>San Francisco</td>
510 <td>Financial Controller</td>
511 <td>San Francisco</td>
521 <td>Office Manager</td>
543 <td>Support Engineer</td>
554 <td>Software Engineer</td>
565 <td>Support Engineer</td>
587 <td>Support Engineer</td>
588 <td>San Francisco</td>
598 <td>Data Coordinator</td>
609 <td>Software Engineer</td>
620 <td>Software Engineer</td>
621 <td>San Francisco</td>
631 <td>Junior Javascript Developer</td>
642 <td>Sales Assistant</td>
653 <td>Regional Director</td>
664 <td>Systems Administrator</td>
676 <td>San Francisco</td>
686 <td>Regional Director</td>
697 <td>Javascript Developer</td>
708 <td>Customer Support</td>
720 <li class="active">Javascript</li>
724 <li>Server-side script</li>
729 <p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
730 $('#example').DataTable( {
738 className: 'control',
745 <p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
748 <li><a href="../../../../media/js/jquery.js">../../../../media/js/jquery.js</a></li>
749 <li><a href="../../../../media/js/jquery.dataTables.js">../../../../media/js/jquery.dataTables.js</a></li>
750 <li><a href="../../js/dataTables.responsive.js">../../js/dataTables.responsive.js</a></li>
755 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
760 <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
761 additional CSS used is shown below:</p><code class="multiline language-css"></code>
764 <p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
767 <li><a href="../../../../media/css/jquery.dataTables.css">../../../../media/css/jquery.dataTables.css</a></li>
768 <li><a href="../../css/dataTables.responsive.css">../../css/dataTables.responsive.css</a></li>
773 <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
778 <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
779 processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
780 documentation</a>.</p>
788 <div class="gradient"></div>
791 <h2>Other examples</h2>
794 <div class="toc-group">
795 <h3><a href="../initialisation/index.html">Basic initialisation</a></h3>
797 <li><a href="../initialisation/className.html">Class name</a></li>
798 <li><a href="../initialisation/option.html">Configuration option</a></li>
799 <li><a href="../initialisation/new.html">`new` constructor</a></li>
800 <li><a href="../initialisation/ajax.html">Ajax data</a></li>
801 <li><a href="../initialisation/default.html">Default initialisation</a></li>
805 <div class="toc-group">
806 <h3><a href="../styling/index.html">Styling</a></h3>
808 <li><a href="../styling/bootstrap.html">Bootstrap styling</a></li>
809 <li><a href="../styling/foundation.html">Foundation styling</a></li>
810 <li><a href="../styling/scrolling.html">Vertical scrolling</a></li>
811 <li><a href="../styling/compact.html">Compact styling</a></li>
815 <div class="toc-group">
816 <h3><a href="../display-control/index.html">Display control</a></h3>
818 <li><a href="../display-control/auto.html">Automatic column hiding</a></li>
819 <li><a href="../display-control/classes.html">Class control</a></li>
820 <li><a href="../display-control/init-classes.html">Assigned class control</a></li>
821 <li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
822 <li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
826 <div class="toc-group">
827 <h3><a href="./index.html">Child rows</a></h3>
828 <ul class="toc active">
829 <li><a href="./disable-child-rows.html">Disable child rows</a></li>
830 <li><a href="./column-control.html">Column controlled child rows</a></li>
831 <li class="active"><a href="./right-column.html">Column control - right</a></li>
832 <li><a href="./whole-row-control.html">Whole row child row control</a></li>
833 <li><a href="./custom-renderer.html">Custom child row renderer</a></li>
838 <div class="epilogue">
839 <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
840 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>
841 which extend the capabilities of DataTables.</p>
843 <p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
844 DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>