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 - Vertical scrolling</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 var table = $('#example').DataTable( {
33 new $.fn.dataTable.Responsive( table );
41 <body class="dt-example">
42 <div class="container">
44 <h1>Responsive example <span>Vertical scrolling</span></h1>
47 <p>This example shows Responsive in use with the <a href="//datatables.net/reference/option/scrollY"><code class="option" title=
48 "DataTables initialisation option">scrollY<span>DT</span></code></a> option to present a scrolling table (instead of using paging as the other Responsive examples
49 do). Responsive will automatically work with the table in such a configuration.</p>
51 <p>Responsive can be used with <a href="//datatables.net/reference/option/scrollX"><code class="option" title=
52 "DataTables initialisation option">scrollX<span>DT</span></code></a>, however it is relatively pointless as Responsive will remove columns to ensure that there is
53 no horizontal scrolling!</p>
56 <table id="example" class="display nowrap" cellspacing="0" width="100%">
75 <td>System Architect</td>
81 <td>t.nixon@datatables.net</td>
92 <td>g.winters@datatables.net</td>
97 <td>Junior Technical Author</td>
98 <td>San Francisco</td>
103 <td>a.cox@datatables.net</td>
108 <td>Senior Javascript Developer</td>
114 <td>c.kelly@datatables.net</td>
125 <td>a.satou@datatables.net</td>
130 <td>Integration Specialist</td>
136 <td>b.williamson@datatables.net</td>
141 <td>Sales Assistant</td>
142 <td>San Francisco</td>
147 <td>h.chandler@datatables.net</td>
152 <td>Integration Specialist</td>
158 <td>r.davidson@datatables.net</td>
163 <td>Javascript Developer</td>
164 <td>San Francisco</td>
169 <td>c.hurst@datatables.net</td>
174 <td>Software Engineer</td>
180 <td>s.frost@datatables.net</td>
185 <td>Office Manager</td>
191 <td>j.gaines@datatables.net</td>
196 <td>Support Lead</td>
202 <td>q.flynn@datatables.net</td>
207 <td>Regional Director</td>
208 <td>San Francisco</td>
213 <td>c.marshall@datatables.net</td>
218 <td>Senior Marketing Designer</td>
224 <td>h.kennedy@datatables.net</td>
229 <td>Regional Director</td>
235 <td>t.fitzpatrick@datatables.net</td>
240 <td>Marketing Designer</td>
246 <td>m.silva@datatables.net</td>
251 <td>Chief Financial Officer (CFO)</td>
257 <td>p.byrd@datatables.net</td>
262 <td>Systems Administrator</td>
268 <td>g.little@datatables.net</td>
273 <td>Software Engineer</td>
279 <td>b.greer@datatables.net</td>
284 <td>Personnel Lead</td>
290 <td>d.rios@datatables.net</td>
295 <td>Development Lead</td>
301 <td>j.caldwell@datatables.net</td>
306 <td>Chief Marketing Officer (CMO)</td>
312 <td>y.berry@datatables.net</td>
317 <td>Pre-Sales Support</td>
323 <td>c.vance@datatables.net</td>
328 <td>Sales Assistant</td>
334 <td>d.wilder@datatables.net</td>
339 <td>Chief Executive Officer (CEO)</td>
345 <td>a.ramos@datatables.net</td>
356 <td>g.joyce@datatables.net</td>
361 <td>Regional Director</td>
367 <td>j.chang@datatables.net</td>
372 <td>Software Engineer</td>
373 <td>San Francisco</td>
378 <td>b.wagner@datatables.net</td>
383 <td>Chief Operating Officer (COO)</td>
384 <td>San Francisco</td>
389 <td>f.green@datatables.net</td>
394 <td>Regional Marketing</td>
400 <td>s.itou@datatables.net</td>
405 <td>Integration Specialist</td>
411 <td>m.house@datatables.net</td>
422 <td>s.burks@datatables.net</td>
427 <td>Technical Author</td>
433 <td>p.bartlett@datatables.net</td>
439 <td>San Francisco</td>
444 <td>g.cortez@datatables.net</td>
449 <td>Post-Sales support</td>
455 <td>m.mccray@datatables.net</td>
460 <td>Marketing Designer</td>
461 <td>San Francisco</td>
466 <td>u.butler@datatables.net</td>
471 <td>Office Manager</td>
472 <td>San Francisco</td>
477 <td>h.hatfield@datatables.net</td>
483 <td>San Francisco</td>
488 <td>h.fuentes@datatables.net</td>
493 <td>Financial Controller</td>
494 <td>San Francisco</td>
499 <td>v.harrell@datatables.net</td>
504 <td>Office Manager</td>
510 <td>t.mooney@datatables.net</td>
521 <td>j.bradshaw@datatables.net</td>
526 <td>Support Engineer</td>
532 <td>o.liang@datatables.net</td>
537 <td>Software Engineer</td>
543 <td>b.nash@datatables.net</td>
548 <td>Support Engineer</td>
554 <td>s.yamamoto@datatables.net</td>
565 <td>t.walton@datatables.net</td>
570 <td>Support Engineer</td>
571 <td>San Francisco</td>
576 <td>f.camacho@datatables.net</td>
581 <td>Data Coordinator</td>
587 <td>s.baldwin@datatables.net</td>
592 <td>Software Engineer</td>
598 <td>z.frank@datatables.net</td>
603 <td>Software Engineer</td>
604 <td>San Francisco</td>
609 <td>z.serrano@datatables.net</td>
614 <td>Junior Javascript Developer</td>
620 <td>j.acosta@datatables.net</td>
625 <td>Sales Assistant</td>
631 <td>c.stevens@datatables.net</td>
636 <td>Regional Director</td>
642 <td>h.butler@datatables.net</td>
647 <td>Systems Administrator</td>
653 <td>l.greer@datatables.net</td>
659 <td>San Francisco</td>
664 <td>j.alexander@datatables.net</td>
669 <td>Regional Director</td>
675 <td>s.decker@datatables.net</td>
680 <td>Javascript Developer</td>
686 <td>m.bruce@datatables.net</td>
691 <td>Customer Support</td>
697 <td>d.snider@datatables.net</td>
703 <li class="active">Javascript</li>
707 <li>Server-side script</li>
712 <p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
713 var table = $('#example').DataTable( {
718 new $.fn.dataTable.Responsive( table );
721 <p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
724 <li><a href="../../../../media/js/jquery.js">../../../../media/js/jquery.js</a></li>
725 <li><a href="../../../../media/js/jquery.dataTables.js">../../../../media/js/jquery.dataTables.js</a></li>
726 <li><a href="../../js/dataTables.responsive.js">../../js/dataTables.responsive.js</a></li>
731 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
736 <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
737 additional CSS used is shown below:</p><code class="multiline language-css">div.container { max-width: 1200px }</code>
740 <p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
743 <li><a href="../../../../media/css/jquery.dataTables.css">../../../../media/css/jquery.dataTables.css</a></li>
744 <li><a href="../../css/dataTables.responsive.css">../../css/dataTables.responsive.css</a></li>
749 <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
754 <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
755 processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
756 documentation</a>.</p>
764 <div class="gradient"></div>
767 <h2>Other examples</h2>
770 <div class="toc-group">
771 <h3><a href="../initialisation/index.html">Basic initialisation</a></h3>
773 <li><a href="../initialisation/className.html">Class name</a></li>
774 <li><a href="../initialisation/option.html">Configuration option</a></li>
775 <li><a href="../initialisation/new.html">`new` constructor</a></li>
776 <li><a href="../initialisation/ajax.html">Ajax data</a></li>
777 <li><a href="../initialisation/default.html">Default initialisation</a></li>
781 <div class="toc-group">
782 <h3><a href="./index.html">Styling</a></h3>
783 <ul class="toc active">
784 <li><a href="./bootstrap.html">Bootstrap styling</a></li>
785 <li><a href="./foundation.html">Foundation styling</a></li>
786 <li class="active"><a href="./scrolling.html">Vertical scrolling</a></li>
787 <li><a href="./compact.html">Compact styling</a></li>
791 <div class="toc-group">
792 <h3><a href="../display-control/index.html">Display control</a></h3>
794 <li><a href="../display-control/auto.html">Automatic column hiding</a></li>
795 <li><a href="../display-control/classes.html">Class control</a></li>
796 <li><a href="../display-control/init-classes.html">Assigned class control</a></li>
797 <li><a href="../display-control/fixedHeader.html">With FixedHeader</a></li>
798 <li><a href="../display-control/complexHeader.html">Complex headers (rowspan / colspan)</a></li>
802 <div class="toc-group">
803 <h3><a href="../child-rows/index.html">Child rows</a></h3>
805 <li><a href="../child-rows/disable-child-rows.html">Disable child rows</a></li>
806 <li><a href="../child-rows/column-control.html">Column controlled child rows</a></li>
807 <li><a href="../child-rows/right-column.html">Column control - right</a></li>
808 <li><a href="../child-rows/whole-row-control.html">Whole row child row control</a></li>
809 <li><a href="../child-rows/custom-renderer.html">Custom child row renderer</a></li>
814 <div class="epilogue">
815 <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
816 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>
817 which extend the capabilities of DataTables.</p>
819 <p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
820 DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>