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>TableTools example - Bootstrap styling
</title>
9 <link rel=
"stylesheet" type=
"text/css" href=
"//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
10 <link rel=
"stylesheet" type=
"text/css" href=
"../../Plugins/integration/bootstrap/3/dataTables.bootstrap.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 body { font-size:
140%; }
16 div.DTTT { margin-bottom:
0.5em; float: right; }
17 div.dataTables_wrapper { clear: both; }
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.tableTools.js"></script>
23 <script type=
"text/javascript" language=
"javascript" src=
"../../Plugins/integration/bootstrap/3/dataTables.bootstrap.js"></script>
24 <script type=
"text/javascript" language=
"javascript" src=
"../../../examples/resources/syntax/shCore.js"></script>
25 <script type=
"text/javascript" language=
"javascript" src=
"../../../examples/resources/demo.js"></script>
26 <script type=
"text/javascript" language=
"javascript" class=
"init">
29 $(document).ready(function() {
30 var table = $('#example').DataTable();
31 var tt = new $.fn.dataTable.TableTools( table );
33 $( tt.fnContainer() ).insertBefore('div.dataTables_wrapper');
40 <body class=
"dt-example">
41 <div class=
"container">
43 <h1>TableTools example
<span>Bootstrap styling
</span></h1>
46 <p><a href=
"http://twitter.github.com/bootstrap/">Twitter Bootstrap
</a> is a very powerful design framework for allowing you to very quickly create applications
47 with a unified look and feel.
<a href=
"http://datatables.net/manual/styling/bootstrap">DataTables integrates well
</a> with Bootstrap, and so does TableTools.
</p>
49 <p>This example shows the default Bootstrap theme being used with a Bootstrap styled DataTable. The
<a href=
"new_init.html"><code>new
</code></a> form of
50 initialising TableTools is used here, as the Bootstrap integration uses a complex
<a href=
"//datatables.net/reference/option/dom"><code class=
"option" title=
51 "DataTables initialisation option">dom
<span>DT
</span></code></a> option (it is possible to provide a custom
<a href=
52 "//datatables.net/reference/option/dom"><code class=
"option" title=
"DataTables initialisation option">dom
<span>DT
</span></code></a> option if you want to, this is
53 just for simplicity!).
</p>
56 <table id=
"example" class=
"table table-striped table-bordered" cellspacing=
"0" width=
"100%">
82 <td>System Architect
</td>
89 <td>Garrett Winters
</td>
98 <td>Junior Technical Author
</td>
99 <td>San Francisco
</td>
105 <td>Cedric Kelly
</td>
106 <td>Senior Javascript Developer
</td>
121 <td>Brielle Williamson
</td>
122 <td>Integration Specialist
</td>
129 <td>Herrod Chandler
</td>
130 <td>Sales Assistant
</td>
131 <td>San Francisco
</td>
137 <td>Rhona Davidson
</td>
138 <td>Integration Specialist
</td>
145 <td>Colleen Hurst
</td>
146 <td>Javascript Developer
</td>
147 <td>San Francisco
</td>
154 <td>Software Engineer
</td>
162 <td>Office Manager
</td>
170 <td>Support Lead
</td>
177 <td>Charde Marshall
</td>
178 <td>Regional Director
</td>
179 <td>San Francisco
</td>
185 <td>Haley Kennedy
</td>
186 <td>Senior Marketing Designer
</td>
193 <td>Tatyana Fitzpatrick
</td>
194 <td>Regional Director
</td>
201 <td>Michael Silva
</td>
202 <td>Marketing Designer
</td>
210 <td>Chief Financial Officer (CFO)
</td>
217 <td>Gloria Little
</td>
218 <td>Systems Administrator
</td>
225 <td>Bradley Greer
</td>
226 <td>Software Engineer
</td>
234 <td>Personnel Lead
</td>
241 <td>Jenette Caldwell
</td>
242 <td>Development Lead
</td>
250 <td>Chief Marketing Officer (CMO)
</td>
257 <td>Caesar Vance
</td>
258 <td>Pre-Sales Support
</td>
265 <td>Doris Wilder
</td>
266 <td>Sales Assistant
</td>
273 <td>Angelica Ramos
</td>
274 <td>Chief Executive Officer (CEO)
</td>
289 <td>Jennifer Chang
</td>
290 <td>Regional Director
</td>
297 <td>Brenden Wagner
</td>
298 <td>Software Engineer
</td>
299 <td>San Francisco
</td>
306 <td>Chief Operating Officer (COO)
</td>
307 <td>San Francisco
</td>
314 <td>Regional Marketing
</td>
321 <td>Michelle House
</td>
322 <td>Integration Specialist
</td>
337 <td>Prescott Bartlett
</td>
338 <td>Technical Author
</td>
345 <td>Gavin Cortez
</td>
347 <td>San Francisco
</td>
353 <td>Martena Mccray
</td>
354 <td>Post-Sales support
</td>
361 <td>Unity Butler
</td>
362 <td>Marketing Designer
</td>
363 <td>San Francisco
</td>
369 <td>Howard Hatfield
</td>
370 <td>Office Manager
</td>
371 <td>San Francisco
</td>
377 <td>Hope Fuentes
</td>
379 <td>San Francisco
</td>
385 <td>Vivian Harrell
</td>
386 <td>Financial Controller
</td>
387 <td>San Francisco
</td>
393 <td>Timothy Mooney
</td>
394 <td>Office Manager
</td>
401 <td>Jackson Bradshaw
</td>
409 <td>Olivia Liang
</td>
410 <td>Support Engineer
</td>
418 <td>Software Engineer
</td>
425 <td>Sakura Yamamoto
</td>
426 <td>Support Engineer
</td>
441 <td>Finn Camacho
</td>
442 <td>Support Engineer
</td>
443 <td>San Francisco
</td>
449 <td>Serge Baldwin
</td>
450 <td>Data Coordinator
</td>
457 <td>Zenaida Frank
</td>
458 <td>Software Engineer
</td>
465 <td>Zorita Serrano
</td>
466 <td>Software Engineer
</td>
467 <td>San Francisco
</td>
473 <td>Jennifer Acosta
</td>
474 <td>Junior Javascript Developer
</td>
481 <td>Cara Stevens
</td>
482 <td>Sales Assistant
</td>
489 <td>Hermione Butler
</td>
490 <td>Regional Director
</td>
498 <td>Systems Administrator
</td>
505 <td>Jonas Alexander
</td>
507 <td>San Francisco
</td>
514 <td>Regional Director
</td>
521 <td>Michael Bruce
</td>
522 <td>Javascript Developer
</td>
529 <td>Donna Snider
</td>
530 <td>Customer Support
</td>
540 <li class=
"active">Javascript
</li>
544 <li>Server-side script
</li>
549 <p>The Javascript shown below is used to initialise the table shown in this example:
</p><code class=
"multiline language-js">$(document).ready(function() {
550 var table = $('#example').DataTable();
551 var tt = new $.fn.dataTable.TableTools( table );
553 $( tt.fnContainer() ).insertBefore('div.dataTables_wrapper');
556 <p>In addition to the above code, the following Javascript library files are loaded for use in this example:
</p>
559 <li><a href=
"../../../media/js/jquery.js">../../../media/js/jquery.js
</a></li>
560 <li><a href=
"../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js
</a></li>
561 <li><a href=
"../js/dataTables.tableTools.js">../js/dataTables.tableTools.js
</a></li>
562 <li><a href=
"../../Plugins/integration/bootstrap/3/dataTables.bootstrap.js">../../Plugins/integration/bootstrap/
3/dataTables.bootstrap.js
</a></li>
567 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:
</p>
572 <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
573 additional CSS used is shown below:
</p><code class=
"multiline language-css">body { font-size:
140%; }
574 div.DTTT { margin-bottom:
0.5em; float: right; }
575 div.dataTables_wrapper { clear: both; }
</code>
578 <p>The following CSS library files are loaded for use in this example to provide the styling of the table:
</p>
581 <li><a href=
"//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">//maxcdn.bootstrapcdn.com/bootstrap/
3.3.2/css/bootstrap.min.css
</a></li>
582 <li><a href=
"../../Plugins/integration/bootstrap/3/dataTables.bootstrap.css">../../Plugins/integration/bootstrap/
3/dataTables.bootstrap.css
</a></li>
587 <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
592 <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
593 processing scripts can be written in any language, using
<a href=
"//datatables.net/manual/server-side">the protocol described in the DataTables
594 documentation
</a>.
</p>
602 <div class=
"gradient"></div>
605 <h2>Other examples
</h2>
608 <div class=
"toc-group">
609 <h3><a href=
"./index.html">Examples
</a></h3>
610 <ul class=
"toc active">
611 <li><a href=
"./simple.html">Basic initialisation
</a></li>
612 <li><a href=
"./swf_path.html">Setting the SWF path
</a></li>
613 <li><a href=
"./new_init.html">Initialisation with `new`
</a></li>
614 <li><a href=
"./defaults.html">Defaults
</a></li>
615 <li><a href=
"./select_single.html">Row selection - single row select
</a></li>
616 <li><a href=
"./select_multi.html">Row selection - multi-row select
</a></li>
617 <li><a href=
"./select_os.html">Row selection - operating system style
</a></li>
618 <li><a href=
"./select_column.html">Row selection - row selector on specific cells
</a></li>
619 <li><a href=
"./multiple_tables.html">Multiple tables
</a></li>
620 <li><a href=
"./multi_instance.html">Multiple toolbars
</a></li>
621 <li><a href=
"./collection.html">Button collections
</a></li>
622 <li><a href=
"./plug-in.html">Plug-in button types
</a></li>
623 <li><a href=
"./button_text.html">Custom button text
</a></li>
624 <li><a href=
"./alter_buttons.html">Button arrangement
</a></li>
625 <li><a href=
"./ajax.html">Ajax loaded data
</a></li>
626 <li><a href=
"./pdf_message.html">PDF message
</a></li>
627 <li class=
"active"><a href=
"./bootstrap.html">Bootstrap styling
</a></li>
628 <li><a href=
"./jqueryui.html">jQuery UI styling
</a></li>
633 <div class=
"epilogue">
634 <p>Please refer to the
<a href=
"http://www.datatables.net">DataTables documentation
</a> for full information about its API properties and methods.
<br>
635 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>
636 which extend the capabilities of DataTables.
</p>
638 <p class=
"copyright">DataTables designed and created by
<a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd
</a> © 2007-
2015<br>
639 DataTables is licensed under the
<a href=
"http://www.datatables.net/mit">MIT license
</a>.
</p>