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 - Configuration option</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">
15 div.container { max-width: 1200px }
18 <script type="text/javascript" language="javascript" src="../../../../media/js/jquery.js"></script>
19 <script type="text/javascript" language="javascript" src="../../../../media/js/jquery.dataTables.js"></script>
20 <script type="text/javascript" language="javascript" src="../../js/dataTables.responsive.js"></script>
21 <script type="text/javascript" language="javascript" src="../../../../examples/resources/syntax/shCore.js"></script>
22 <script type="text/javascript" language="javascript" src="../../../../examples/resources/demo.js"></script>
23 <script type="text/javascript" language="javascript" class="init">
27 $(document).ready(function() {
28 $('#example').DataTable( {
38 <body class="dt-example">
39 <div class="container">
41 <h1>Responsive example <span>Configuration option</span></h1>
44 <p>The Responsive extension for DataTables can be applied to a DataTable in one of two ways; with a specific class name on the table, or using the DataTables
45 initialisation options. This method shows the latter, with the <a href="//datatables.net/extensions/responsive/reference/option/responsive"><code class="option"
46 title="Responsive initialisation option">responsive<span>R</span></code></a> option being set to the boolean value <code>true</code>.</p>
48 <p>The <a href="//datatables.net/extensions/responsive/reference/option/responsive"><code class="option" title=
49 "Responsive initialisation option">responsive<span>R</span></code></a> option can be given as a boolean value, or as an object with configuration options. If as a
50 boolean, as in this case, the default options are used.</p>
53 <table id="example" class="display nowrap" cellspacing="0" width="100%">
72 <td>System Architect</td>
78 <td>t.nixon@datatables.net</td>
89 <td>g.winters@datatables.net</td>
94 <td>Junior Technical Author</td>
95 <td>San Francisco</td>
100 <td>a.cox@datatables.net</td>
105 <td>Senior Javascript Developer</td>
111 <td>c.kelly@datatables.net</td>
122 <td>a.satou@datatables.net</td>
127 <td>Integration Specialist</td>
133 <td>b.williamson@datatables.net</td>
138 <td>Sales Assistant</td>
139 <td>San Francisco</td>
144 <td>h.chandler@datatables.net</td>
149 <td>Integration Specialist</td>
155 <td>r.davidson@datatables.net</td>
160 <td>Javascript Developer</td>
161 <td>San Francisco</td>
166 <td>c.hurst@datatables.net</td>
171 <td>Software Engineer</td>
177 <td>s.frost@datatables.net</td>
182 <td>Office Manager</td>
188 <td>j.gaines@datatables.net</td>
193 <td>Support Lead</td>
199 <td>q.flynn@datatables.net</td>
204 <td>Regional Director</td>
205 <td>San Francisco</td>
210 <td>c.marshall@datatables.net</td>
215 <td>Senior Marketing Designer</td>
221 <td>h.kennedy@datatables.net</td>
226 <td>Regional Director</td>
232 <td>t.fitzpatrick@datatables.net</td>
237 <td>Marketing Designer</td>
243 <td>m.silva@datatables.net</td>
248 <td>Chief Financial Officer (CFO)</td>
254 <td>p.byrd@datatables.net</td>
259 <td>Systems Administrator</td>
265 <td>g.little@datatables.net</td>
270 <td>Software Engineer</td>
276 <td>b.greer@datatables.net</td>
281 <td>Personnel Lead</td>
287 <td>d.rios@datatables.net</td>
292 <td>Development Lead</td>
298 <td>j.caldwell@datatables.net</td>
303 <td>Chief Marketing Officer (CMO)</td>
309 <td>y.berry@datatables.net</td>
314 <td>Pre-Sales Support</td>
320 <td>c.vance@datatables.net</td>
325 <td>Sales Assistant</td>
331 <td>d.wilder@datatables.net</td>
336 <td>Chief Executive Officer (CEO)</td>
342 <td>a.ramos@datatables.net</td>
353 <td>g.joyce@datatables.net</td>
358 <td>Regional Director</td>
364 <td>j.chang@datatables.net</td>
369 <td>Software Engineer</td>
370 <td>San Francisco</td>
375 <td>b.wagner@datatables.net</td>
380 <td>Chief Operating Officer (COO)</td>
381 <td>San Francisco</td>
386 <td>f.green@datatables.net</td>
391 <td>Regional Marketing</td>
397 <td>s.itou@datatables.net</td>
402 <td>Integration Specialist</td>
408 <td>m.house@datatables.net</td>
419 <td>s.burks@datatables.net</td>
424 <td>Technical Author</td>
430 <td>p.bartlett@datatables.net</td>
436 <td>San Francisco</td>
441 <td>g.cortez@datatables.net</td>
446 <td>Post-Sales support</td>
452 <td>m.mccray@datatables.net</td>
457 <td>Marketing Designer</td>
458 <td>San Francisco</td>
463 <td>u.butler@datatables.net</td>
468 <td>Office Manager</td>
469 <td>San Francisco</td>
474 <td>h.hatfield@datatables.net</td>
480 <td>San Francisco</td>
485 <td>h.fuentes@datatables.net</td>
490 <td>Financial Controller</td>
491 <td>San Francisco</td>
496 <td>v.harrell@datatables.net</td>
501 <td>Office Manager</td>
507 <td>t.mooney@datatables.net</td>
518 <td>j.bradshaw@datatables.net</td>
523 <td>Support Engineer</td>
529 <td>o.liang@datatables.net</td>
534 <td>Software Engineer</td>
540 <td>b.nash@datatables.net</td>
545 <td>Support Engineer</td>
551 <td>s.yamamoto@datatables.net</td>
562 <td>t.walton@datatables.net</td>
567 <td>Support Engineer</td>
568 <td>San Francisco</td>
573 <td>f.camacho@datatables.net</td>
578 <td>Data Coordinator</td>
584 <td>s.baldwin@datatables.net</td>
589 <td>Software Engineer</td>
595 <td>z.frank@datatables.net</td>
600 <td>Software Engineer</td>
601 <td>San Francisco</td>
606 <td>z.serrano@datatables.net</td>
611 <td>Junior Javascript Developer</td>
617 <td>j.acosta@datatables.net</td>
622 <td>Sales Assistant</td>
628 <td>c.stevens@datatables.net</td>
633 <td>Regional Director</td>
639 <td>h.butler@datatables.net</td>
644 <td>Systems Administrator</td>
650 <td>l.greer@datatables.net</td>
656 <td>San Francisco</td>
661 <td>j.alexander@datatables.net</td>
666 <td>Regional Director</td>
672 <td>s.decker@datatables.net</td>
677 <td>Javascript Developer</td>
683 <td>m.bruce@datatables.net</td>
688 <td>Customer Support</td>
694 <td>d.snider@datatables.net</td>
700 <li class="active">Javascript</li>
704 <li>Server-side script</li>
709 <p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
710 $('#example').DataTable( {
715 <p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
718 <li><a href="../../../../media/js/jquery.js">../../../../media/js/jquery.js</a></li>
719 <li><a href="../../../../media/js/jquery.dataTables.js">../../../../media/js/jquery.dataTables.js</a></li>
720 <li><a href="../../js/dataTables.responsive.js">../../js/dataTables.responsive.js</a></li>
725 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
730 <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
731 additional CSS used is shown below:</p><code class="multiline language-css">div.container { max-width: 1200px }</code>
734 <p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
737 <li><a href="../../../../media/css/jquery.dataTables.css">../../../../media/css/jquery.dataTables.css</a></li>
738 <li><a href="../../css/dataTables.responsive.css">../../css/dataTables.responsive.css</a></li>
743 <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
748 <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
749 processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
750 documentation</a>.</p>
758 <div class="gradient"></div>
761 <h2>Other examples</h2>
764 <div class="toc-group">
765 <h3><a href="./index.html">Basic initialisation</a></h3>
766 <ul class="toc active">
767 <li><a href="./className.html">Class name</a></li>
768 <li class="active"><a href="./option.html">Configuration option</a></li>
769 <li><a href="./new.html">`new` constructor</a></li>
770 <li><a href="./ajax.html">Ajax data</a></li>
771 <li><a href="./default.html">Default initialisation</a></li>
775 <div class="toc-group">
776 <h3><a href="../styling/index.html">Styling</a></h3>
778 <li><a href="../styling/bootstrap.html">Bootstrap styling</a></li>
779 <li><a href="../styling/foundation.html">Foundation styling</a></li>
780 <li><a href="../styling/scrolling.html">Vertical scrolling</a></li>
781 <li><a href="../styling/compact.html">Compact styling</a></li>
785 <div class="toc-group">
786 <h3><a href="../display-control/index.html">Display control</a></h3>
788 <li><a href="../display-control/auto.html">Automatic column hiding</a></li>
789 <li><a href="../display-control/classes.html">Class control</a></li>
790 <li><a href="../display-control/init-classes.html">Assigned class control</a></li>
791 <li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
792 <li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
796 <div class="toc-group">
797 <h3><a href="../child-rows/index.html">Child rows</a></h3>
799 <li><a href="../child-rows/disable-child-rows.html">Disable child rows</a></li>
800 <li><a href="../child-rows/column-control.html">Column controlled child rows</a></li>
801 <li><a href="../child-rows/right-column.html">Column control - right</a></li>
802 <li><a href="../child-rows/whole-row-control.html">Whole row child row control</a></li>
803 <li><a href="../child-rows/custom-renderer.html">Custom child row renderer</a></li>
808 <div class="epilogue">
809 <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
810 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>
811 which extend the capabilities of DataTables.</p>
813 <p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
814 DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>