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>ColVis example - Custom button text
</title>
9 <link rel=
"stylesheet" type=
"text/css" href=
"../../../media/css/jquery.dataTables.css">
10 <link rel=
"stylesheet" type=
"text/css" href=
"../css/dataTables.colVis.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.colVis.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">
24 $(document).ready(function() {
25 $('#example').DataTable( {
26 "dom": 'C<
"clear">lfrtip',
28 "buttonText":
"Change columns"
37 <body class=
"dt-example">
38 <div class=
"container">
40 <h1>ColVis example
<span>Custom button text
</span></h1>
43 <p>You may wish to use your own text in the ColVis button - this is done by making use of the
<code>buttonText
</code> initialisation option, as shown in this
46 <p>For full information about the ColVis options, please refer to the
<a href=
"//datatables.net/extensions/colvis/options">ColVis options documentation
</a>.
</p>
49 <table id=
"example" class=
"display" cellspacing=
"0" width=
"100%">
75 <td>System Architect
</td>
82 <td>Garrett Winters
</td>
91 <td>Junior Technical Author
</td>
92 <td>San Francisco
</td>
99 <td>Senior Javascript Developer
</td>
114 <td>Brielle Williamson
</td>
115 <td>Integration Specialist
</td>
122 <td>Herrod Chandler
</td>
123 <td>Sales Assistant
</td>
124 <td>San Francisco
</td>
130 <td>Rhona Davidson
</td>
131 <td>Integration Specialist
</td>
138 <td>Colleen Hurst
</td>
139 <td>Javascript Developer
</td>
140 <td>San Francisco
</td>
147 <td>Software Engineer
</td>
155 <td>Office Manager
</td>
163 <td>Support Lead
</td>
170 <td>Charde Marshall
</td>
171 <td>Regional Director
</td>
172 <td>San Francisco
</td>
178 <td>Haley Kennedy
</td>
179 <td>Senior Marketing Designer
</td>
186 <td>Tatyana Fitzpatrick
</td>
187 <td>Regional Director
</td>
194 <td>Michael Silva
</td>
195 <td>Marketing Designer
</td>
203 <td>Chief Financial Officer (CFO)
</td>
210 <td>Gloria Little
</td>
211 <td>Systems Administrator
</td>
218 <td>Bradley Greer
</td>
219 <td>Software Engineer
</td>
227 <td>Personnel Lead
</td>
234 <td>Jenette Caldwell
</td>
235 <td>Development Lead
</td>
243 <td>Chief Marketing Officer (CMO)
</td>
250 <td>Caesar Vance
</td>
251 <td>Pre-Sales Support
</td>
258 <td>Doris Wilder
</td>
259 <td>Sales Assistant
</td>
266 <td>Angelica Ramos
</td>
267 <td>Chief Executive Officer (CEO)
</td>
282 <td>Jennifer Chang
</td>
283 <td>Regional Director
</td>
290 <td>Brenden Wagner
</td>
291 <td>Software Engineer
</td>
292 <td>San Francisco
</td>
299 <td>Chief Operating Officer (COO)
</td>
300 <td>San Francisco
</td>
307 <td>Regional Marketing
</td>
314 <td>Michelle House
</td>
315 <td>Integration Specialist
</td>
330 <td>Prescott Bartlett
</td>
331 <td>Technical Author
</td>
338 <td>Gavin Cortez
</td>
340 <td>San Francisco
</td>
346 <td>Martena Mccray
</td>
347 <td>Post-Sales support
</td>
354 <td>Unity Butler
</td>
355 <td>Marketing Designer
</td>
356 <td>San Francisco
</td>
362 <td>Howard Hatfield
</td>
363 <td>Office Manager
</td>
364 <td>San Francisco
</td>
370 <td>Hope Fuentes
</td>
372 <td>San Francisco
</td>
378 <td>Vivian Harrell
</td>
379 <td>Financial Controller
</td>
380 <td>San Francisco
</td>
386 <td>Timothy Mooney
</td>
387 <td>Office Manager
</td>
394 <td>Jackson Bradshaw
</td>
402 <td>Olivia Liang
</td>
403 <td>Support Engineer
</td>
411 <td>Software Engineer
</td>
418 <td>Sakura Yamamoto
</td>
419 <td>Support Engineer
</td>
434 <td>Finn Camacho
</td>
435 <td>Support Engineer
</td>
436 <td>San Francisco
</td>
442 <td>Serge Baldwin
</td>
443 <td>Data Coordinator
</td>
450 <td>Zenaida Frank
</td>
451 <td>Software Engineer
</td>
458 <td>Zorita Serrano
</td>
459 <td>Software Engineer
</td>
460 <td>San Francisco
</td>
466 <td>Jennifer Acosta
</td>
467 <td>Junior Javascript Developer
</td>
474 <td>Cara Stevens
</td>
475 <td>Sales Assistant
</td>
482 <td>Hermione Butler
</td>
483 <td>Regional Director
</td>
491 <td>Systems Administrator
</td>
498 <td>Jonas Alexander
</td>
500 <td>San Francisco
</td>
507 <td>Regional Director
</td>
514 <td>Michael Bruce
</td>
515 <td>Javascript Developer
</td>
522 <td>Donna Snider
</td>
523 <td>Customer Support
</td>
533 <li class=
"active">Javascript
</li>
537 <li>Server-side script
</li>
542 <p>The Javascript shown below is used to initialise the table shown in this example:
</p><code class=
"multiline language-js">$(document).ready(function() {
543 $('#example').DataTable( {
544 "dom
": 'C
<"clear
">lfrtip',
545 "colVis
": {
546 "buttonText
":
"Change columns
"
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=
"../js/dataTables.colVis.js">../js/dataTables.colVis.js
</a></li>
561 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:
</p>
566 <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
567 additional CSS used is shown below:
</p><code class=
"multiline language-css"></code>
570 <p>The following CSS library files are loaded for use in this example to provide the styling of the table:
</p>
573 <li><a href=
"../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css
</a></li>
574 <li><a href=
"../css/dataTables.colVis.css">../css/dataTables.colVis.css
</a></li>
579 <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
584 <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
585 processing scripts can be written in any language, using
<a href=
"//datatables.net/manual/server-side">the protocol described in the DataTables
586 documentation
</a>.
</p>
594 <div class=
"gradient"></div>
597 <h2>Other examples
</h2>
600 <div class=
"toc-group">
601 <h3><a href=
"./index.html">Examples
</a></h3>
602 <ul class=
"toc active">
603 <li><a href=
"./simple.html">Basic initialisation
</a></li>
604 <li><a href=
"./new_init.html">`new` initialisation
</a></li>
605 <li class=
"active"><a href=
"./text.html">Custom button text
</a></li>
606 <li><a href=
"./exclude_columns.html">Exclude columns from list
</a></li>
607 <li><a href=
"./title_callback.html">Column button callback
</a></li>
608 <li><a href=
"./button_order.html">Button ordering
</a></li>
609 <li><a href=
"./mouseover.html">Mouseover activation
</a></li>
610 <li><a href=
"./group_columns.html">Group columns
</a></li>
611 <li><a href=
"./two_tables.html">Two tables with individual controls
</a></li>
612 <li><a href=
"./two_tables_identical.html">Two tables with shared controls
</a></li>
613 <li><a href=
"./restore.html">Restore / show all
</a></li>
614 <li><a href=
"./jqueryui.html">jQuery UI styling
</a></li>
619 <div class=
"epilogue">
620 <p>Please refer to the
<a href=
"http://www.datatables.net">DataTables documentation
</a> for full information about its API properties and methods.
<br>
621 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>
622 which extend the capabilities of DataTables.
</p>
624 <p class=
"copyright">DataTables designed and created by
<a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd
</a> © 2007-
2015<br>
625 DataTables is licensed under the
<a href=
"http://www.datatables.net/mit">MIT license
</a>.
</p>