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>ColReorder example - jQuery UI styling</title>
9 <link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
10 <link rel="stylesheet" type="text/css" href="../../Plugins/integration/jqueryui/dataTables.jqueryui.css">
11 <link rel="stylesheet" type="text/css" href="../css/dataTables.colReorder.css">
12 <link rel="stylesheet" type="text/css" href="../../../examples/resources/syntax/shCore.css">
13 <link rel="stylesheet" type="text/css" href="../../../examples/resources/demo.css">
14 <style type="text/css" class="init">
17 <script type="text/javascript" language="javascript" src="../../../media/js/jquery.js"></script>
18 <script type="text/javascript" language="javascript" src="../../../media/js/jquery.dataTables.js"></script>
19 <script type="text/javascript" language="javascript" src="../../Plugins/integration/jqueryui/dataTables.jqueryui.js"></script>
20 <script type="text/javascript" language="javascript" src="../js/dataTables.colReorder.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();
30 new $.fn.dataTable.ColReorder( table );
38 <body class="dt-example">
39 <div class="container">
41 <h1>ColReorder example <span>jQuery UI styling</span></h1>
44 <p>This example shows how the jQuery UI ThemeRoller option in DataTables can be used with ColReorder.</p>
46 <p>The important thing to note here is that it is easier to use <code>new $.fn.dataTable.ColReorder()</code> to add ColReorder to the table rather than <a href=
47 "//datatables.net/reference/option/dom"><code class="option" title="DataTables initialisation option">dom<span>DT</span></code></a> as the jQuery UI integration
48 uses a complex expression for <a href="//datatables.net/reference/option/dom"><code class="option" title=
49 "DataTables initialisation option">dom<span>DT</span></code></a>.</p>
52 <table id="example" class="display" cellspacing="0" width="100%">
78 <td>System Architect</td>
85 <td>Garrett Winters</td>
94 <td>Junior Technical Author</td>
95 <td>San Francisco</td>
101 <td>Cedric Kelly</td>
102 <td>Senior Javascript Developer</td>
117 <td>Brielle Williamson</td>
118 <td>Integration Specialist</td>
125 <td>Herrod Chandler</td>
126 <td>Sales Assistant</td>
127 <td>San Francisco</td>
133 <td>Rhona Davidson</td>
134 <td>Integration Specialist</td>
141 <td>Colleen Hurst</td>
142 <td>Javascript Developer</td>
143 <td>San Francisco</td>
150 <td>Software Engineer</td>
158 <td>Office Manager</td>
166 <td>Support Lead</td>
173 <td>Charde Marshall</td>
174 <td>Regional Director</td>
175 <td>San Francisco</td>
181 <td>Haley Kennedy</td>
182 <td>Senior Marketing Designer</td>
189 <td>Tatyana Fitzpatrick</td>
190 <td>Regional Director</td>
197 <td>Michael Silva</td>
198 <td>Marketing Designer</td>
206 <td>Chief Financial Officer (CFO)</td>
213 <td>Gloria Little</td>
214 <td>Systems Administrator</td>
221 <td>Bradley Greer</td>
222 <td>Software Engineer</td>
230 <td>Personnel Lead</td>
237 <td>Jenette Caldwell</td>
238 <td>Development Lead</td>
246 <td>Chief Marketing Officer (CMO)</td>
253 <td>Caesar Vance</td>
254 <td>Pre-Sales Support</td>
261 <td>Doris Wilder</td>
262 <td>Sales Assistant</td>
269 <td>Angelica Ramos</td>
270 <td>Chief Executive Officer (CEO)</td>
285 <td>Jennifer Chang</td>
286 <td>Regional Director</td>
293 <td>Brenden Wagner</td>
294 <td>Software Engineer</td>
295 <td>San Francisco</td>
302 <td>Chief Operating Officer (COO)</td>
303 <td>San Francisco</td>
310 <td>Regional Marketing</td>
317 <td>Michelle House</td>
318 <td>Integration Specialist</td>
333 <td>Prescott Bartlett</td>
334 <td>Technical Author</td>
341 <td>Gavin Cortez</td>
343 <td>San Francisco</td>
349 <td>Martena Mccray</td>
350 <td>Post-Sales support</td>
357 <td>Unity Butler</td>
358 <td>Marketing Designer</td>
359 <td>San Francisco</td>
365 <td>Howard Hatfield</td>
366 <td>Office Manager</td>
367 <td>San Francisco</td>
373 <td>Hope Fuentes</td>
375 <td>San Francisco</td>
381 <td>Vivian Harrell</td>
382 <td>Financial Controller</td>
383 <td>San Francisco</td>
389 <td>Timothy Mooney</td>
390 <td>Office Manager</td>
397 <td>Jackson Bradshaw</td>
405 <td>Olivia Liang</td>
406 <td>Support Engineer</td>
414 <td>Software Engineer</td>
421 <td>Sakura Yamamoto</td>
422 <td>Support Engineer</td>
437 <td>Finn Camacho</td>
438 <td>Support Engineer</td>
439 <td>San Francisco</td>
445 <td>Serge Baldwin</td>
446 <td>Data Coordinator</td>
453 <td>Zenaida Frank</td>
454 <td>Software Engineer</td>
461 <td>Zorita Serrano</td>
462 <td>Software Engineer</td>
463 <td>San Francisco</td>
469 <td>Jennifer Acosta</td>
470 <td>Junior Javascript Developer</td>
477 <td>Cara Stevens</td>
478 <td>Sales Assistant</td>
485 <td>Hermione Butler</td>
486 <td>Regional Director</td>
494 <td>Systems Administrator</td>
501 <td>Jonas Alexander</td>
503 <td>San Francisco</td>
510 <td>Regional Director</td>
517 <td>Michael Bruce</td>
518 <td>Javascript Developer</td>
525 <td>Donna Snider</td>
526 <td>Customer Support</td>
536 <li class="active">Javascript</li>
540 <li>Server-side script</li>
545 <p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
546 var table = $('#example').dataTable();
548 new $.fn.dataTable.ColReorder( table );
551 <p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
554 <li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
555 <li><a href="../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
556 <li><a href="../../Plugins/integration/jqueryui/dataTables.jqueryui.js">../../Plugins/integration/jqueryui/dataTables.jqueryui.js</a></li>
557 <li><a href="../js/dataTables.colReorder.js">../js/dataTables.colReorder.js</a></li>
562 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
567 <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
568 additional CSS used is shown below:</p><code class="multiline language-css"></code>
571 <p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
574 <li><a href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css</a></li>
575 <li><a href="../../Plugins/integration/jqueryui/dataTables.jqueryui.css">../../Plugins/integration/jqueryui/dataTables.jqueryui.css</a></li>
576 <li><a href="../css/dataTables.colReorder.css">../css/dataTables.colReorder.css</a></li>
581 <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
586 <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
587 processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
588 documentation</a>.</p>
596 <div class="gradient"></div>
599 <h2>Other examples</h2>
602 <div class="toc-group">
603 <h3><a href="./index.html">Examples</a></h3>
604 <ul class="toc active">
605 <li><a href="./simple.html">Basic initialisation</a></li>
606 <li><a href="./new_init.html">Initialisation using `new`</a></li>
607 <li><a href="./alt_insert.html">Alternative insert styling</a></li>
608 <li><a href="./realtime.html">Realtime updating</a></li>
609 <li><a href="./state_save.html">State saving</a></li>
610 <li><a href="./scrolling.html">Scrolling table</a></li>
611 <li><a href="./predefined.html">Predefined column ordering</a></li>
612 <li><a href="./reset.html">Reset ordering API</a></li>
613 <li><a href="./colvis.html">ColVis integration</a></li>
614 <li><a href="./fixedcolumns.html">FixedColumns integration</a></li>
615 <li><a href="./fixedheader.html">FixedHeader integration</a></li>
616 <li class="active"><a href="./jqueryui.html">jQuery UI styling</a></li>
617 <li><a href="./col_filter.html">Individual column filtering</a></li>
618 <li><a href="./server_side.html">Server-side processing</a></li>
623 <div class="epilogue">
624 <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
625 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>
626 which extend the capabilities of DataTables.</p>
628 <p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
629 DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>