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>KeyTable example - Basic initialisation</title>
9 <link rel="stylesheet" type="text/css" href="../../../media/css/jquery.dataTables.css">
10 <link rel="stylesheet" type="text/css" href="../css/dataTables.keyTable.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.keyTable.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 var table = $('#example').DataTable();
27 new $.fn.dataTable.KeyTable( table );
34 <body class="dt-example">
35 <div class="container">
37 <h1>KeyTable example <span>Basic initialisation</span></h1>
40 <p>KeyTable allows you to use keyboard navigation on a DataTables enhanced table, like an Excel
41 spreadsheet. The focused cell is shown through the CSS class ('focus') which in the case below is
42 simply a blue border. Use your keyboard's arrow keys and click the cells in the table to navigate.</p>
44 <p>This example simply shows key table being initialised on a DataTable, but <a href=
45 "events.html">events</a> can be listened for through the KeyTable API which provide interaction
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
543 example:</p><code class="multiline brush: js;">$(document).ready(function() {
544 var table = $('#example').DataTable();
546 new $.fn.dataTable.KeyTable( table );
549 <p>In addition to the above code, the following Javascript library files are loaded for use in this
553 <li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
555 "../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
556 <li><a href="../js/dataTables.keyTable.js">../js/dataTables.keyTable.js</a></li>
561 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by
567 <p>This example uses a little bit of additional CSS beyond what is loaded from the library
568 files (below), in order to correctly display the table. The additional CSS used is shown
569 below:</p><code class="multiline brush: js;"></code>
572 <p>The following CSS library files are loaded for use in this example to provide the styling of the
577 "../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
578 <li><a href="../css/dataTables.keyTable.css">../css/dataTables.keyTable.css</a></li>
583 <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
584 will update automatically as any additional data is loaded.</p>
588 <p>The script used to perform the server-side processing for this table is shown below. Please note
589 that this is just an example script using PHP. Server-side processing scripts can be written in any
590 language, using <a href="//datatables.net/manual/server-side">the protocol described in the
591 DataTables documentation</a>.</p>
599 <div class="gradient"></div>
602 <h2>Other examples</h2>
605 <div class="toc-group">
606 <h3><a href="./index.html">Examples</a></h3>
607 <ul class="toc active">
608 <li class="active"><a href="./simple.html">Basic initialisation</a></li>
609 <li><a href="./events.html">Events</a></li>
610 <li><a href="./scrolling.html">Scrolling table</a></li>
611 <li><a href="./html.html">Plain HTML table</a></li>
616 <div class="epilogue">
617 <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
618 information about its API properties and methods.<br>
619 Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
620 <a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
623 <p class="copyright">DataTables designed and created by <a href=
624 "http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2014<br>
625 DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>