events.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  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">
  7. <title>KeyTable example - Events</title>
  8. <link rel="stylesheet" type="text/css" href="../../../media/css/jquery.dataTables.css">
  9. <link rel="stylesheet" type="text/css" href="../css/dataTables.keyTable.css">
  10. <link rel="stylesheet" type="text/css" href="../../../examples/resources/syntax/shCore.css">
  11. <link rel="stylesheet" type="text/css" href="../../../examples/resources/demo.css">
  12. <style type="text/css" class="init">
  13. </style>
  14. <script type="text/javascript" language="javascript" src="../../../media/js/jquery.js"></script>
  15. <script type="text/javascript" language="javascript" src="../../../media/js/jquery.dataTables.js"></script>
  16. <script type="text/javascript" language="javascript" src="../js/dataTables.keyTable.js"></script>
  17. <script type="text/javascript" language="javascript" src="../../../examples/resources/syntax/shCore.js"></script>
  18. <script type="text/javascript" language="javascript" src="../../../examples/resources/demo.js"></script>
  19. <script type="text/javascript" language="javascript" class="init">
  20. function eventMsg ( msg ) {
  21. var n = document.getElementById('info');
  22. n.innerHTML += msg+"<br>";
  23. n.scrollTop = n.scrollHeight;
  24. }
  25. $(document).ready(function() {
  26. var table = $('#example').DataTable();
  27. var keys = new $.fn.dataTable.KeyTable( table );
  28. /* Focus handler for all cells in last column */
  29. keys.event.focus( 4, null, function( node, x, y ) {
  30. eventMsg( "Cell "+x+","+y+" focused ('live' event - column)" );
  31. } );
  32. /* Focus handler for all cells in 8th row */
  33. keys.event.focus( null, 7, function( node, x, y ) {
  34. eventMsg( "Cell "+x+","+y+" focused ('live' event - row)" );
  35. } );
  36. /* Focus using coords. */
  37. keys.event.focus( 1, 0, function( node ) {
  38. keys.event.remove.focus( node );
  39. eventMsg( "Cell 1,0 focus - this event has now been removed" );
  40. } );
  41. keys.event.focus( 1, 3, function() {
  42. eventMsg( "Cell 1,3 focus" );
  43. } );
  44. /* focus with a node */
  45. keys.event.focus( $('#example tbody tr:eq(2) td:eq(0)')[0], function() {
  46. eventMsg( "Cell 0,2 focus" );
  47. } );
  48. /* Blur using a node */
  49. keys.event.blur( $('#example tbody tr:eq(1) td:eq(2)')[0], function() {
  50. eventMsg( "Cell 1,2 blur" );
  51. } );
  52. /* Blur using coords */
  53. keys.event.blur( 2, 4, function() {
  54. eventMsg( "Cell 2,4 blur" );
  55. } );
  56. /* Action */
  57. keys.event.action( 2, 2, function( node ) {
  58. eventMsg( "Cell 2,2 action" );
  59. if ( node.style.fontWeight == "" || node.style.fontWeight == "normal" ) {
  60. node.style.fontWeight = "bold";
  61. }
  62. else {
  63. node.style.fontWeight = "normal";
  64. }
  65. } );
  66. keys.event.action( 2, 5, function( node ) {
  67. eventMsg( "Cell 2,5 action" );
  68. if ( node.style.fontStyle == "" ) {
  69. node.style.fontStyle = "italic";
  70. }
  71. else {
  72. node.style.fontStyle = "";
  73. }
  74. } );
  75. } );
  76. </script>
  77. </head>
  78. <body class="dt-example">
  79. <div class="container">
  80. <section>
  81. <h1>KeyTable example <span>Events</span></h1>
  82. <div class="info">
  83. <p>KeyTable provides the ability to listen for events such as <code>focus</code>, <code>blur</code>,
  84. <code>esc</code> (the escape key) and 'return' (the return key) can be assigned event handling
  85. functions through KeyTable's the API. This gives you the ability to take an action on a cell.</p>
  86. <p>The example shown below has a few cells (selected at random, but near the top) with blur and focus
  87. events assigned to them. You can also see the navigation around the table using arrow keys.</p>
  88. </div>
  89. <div id="info" class="box">
  90. Event information:<br>
  91. </div>
  92. <table id="example" class="display" cellspacing="0" width="100%">
  93. <thead>
  94. <tr>
  95. <th>Name</th>
  96. <th>Position</th>
  97. <th>Office</th>
  98. <th>Age</th>
  99. <th>Start date</th>
  100. <th>Salary</th>
  101. </tr>
  102. </thead>
  103. <tfoot>
  104. <tr>
  105. <th>Name</th>
  106. <th>Position</th>
  107. <th>Office</th>
  108. <th>Age</th>
  109. <th>Start date</th>
  110. <th>Salary</th>
  111. </tr>
  112. </tfoot>
  113. <tbody>
  114. <tr>
  115. <td>Tiger Nixon</td>
  116. <td>System Architect</td>
  117. <td>Edinburgh</td>
  118. <td>61</td>
  119. <td>2011/04/25</td>
  120. <td>$320,800</td>
  121. </tr>
  122. <tr>
  123. <td>Garrett Winters</td>
  124. <td>Accountant</td>
  125. <td>Tokyo</td>
  126. <td>63</td>
  127. <td>2011/07/25</td>
  128. <td>$170,750</td>
  129. </tr>
  130. <tr>
  131. <td>Ashton Cox</td>
  132. <td>Junior Technical Author</td>
  133. <td>San Francisco</td>
  134. <td>66</td>
  135. <td>2009/01/12</td>
  136. <td>$86,000</td>
  137. </tr>
  138. <tr>
  139. <td>Cedric Kelly</td>
  140. <td>Senior Javascript Developer</td>
  141. <td>Edinburgh</td>
  142. <td>22</td>
  143. <td>2012/03/29</td>
  144. <td>$433,060</td>
  145. </tr>
  146. <tr>
  147. <td>Airi Satou</td>
  148. <td>Accountant</td>
  149. <td>Tokyo</td>
  150. <td>33</td>
  151. <td>2008/11/28</td>
  152. <td>$162,700</td>
  153. </tr>
  154. <tr>
  155. <td>Brielle Williamson</td>
  156. <td>Integration Specialist</td>
  157. <td>New York</td>
  158. <td>61</td>
  159. <td>2012/12/02</td>
  160. <td>$372,000</td>
  161. </tr>
  162. <tr>
  163. <td>Herrod Chandler</td>
  164. <td>Sales Assistant</td>
  165. <td>San Francisco</td>
  166. <td>59</td>
  167. <td>2012/08/06</td>
  168. <td>$137,500</td>
  169. </tr>
  170. <tr>
  171. <td>Rhona Davidson</td>
  172. <td>Integration Specialist</td>
  173. <td>Tokyo</td>
  174. <td>55</td>
  175. <td>2010/10/14</td>
  176. <td>$327,900</td>
  177. </tr>
  178. <tr>
  179. <td>Colleen Hurst</td>
  180. <td>Javascript Developer</td>
  181. <td>San Francisco</td>
  182. <td>39</td>
  183. <td>2009/09/15</td>
  184. <td>$205,500</td>
  185. </tr>
  186. <tr>
  187. <td>Sonya Frost</td>
  188. <td>Software Engineer</td>
  189. <td>Edinburgh</td>
  190. <td>23</td>
  191. <td>2008/12/13</td>
  192. <td>$103,600</td>
  193. </tr>
  194. <tr>
  195. <td>Jena Gaines</td>
  196. <td>Office Manager</td>
  197. <td>London</td>
  198. <td>30</td>
  199. <td>2008/12/19</td>
  200. <td>$90,560</td>
  201. </tr>
  202. <tr>
  203. <td>Quinn Flynn</td>
  204. <td>Support Lead</td>
  205. <td>Edinburgh</td>
  206. <td>22</td>
  207. <td>2013/03/03</td>
  208. <td>$342,000</td>
  209. </tr>
  210. <tr>
  211. <td>Charde Marshall</td>
  212. <td>Regional Director</td>
  213. <td>San Francisco</td>
  214. <td>36</td>
  215. <td>2008/10/16</td>
  216. <td>$470,600</td>
  217. </tr>
  218. <tr>
  219. <td>Haley Kennedy</td>
  220. <td>Senior Marketing Designer</td>
  221. <td>London</td>
  222. <td>43</td>
  223. <td>2012/12/18</td>
  224. <td>$313,500</td>
  225. </tr>
  226. <tr>
  227. <td>Tatyana Fitzpatrick</td>
  228. <td>Regional Director</td>
  229. <td>London</td>
  230. <td>19</td>
  231. <td>2010/03/17</td>
  232. <td>$385,750</td>
  233. </tr>
  234. <tr>
  235. <td>Michael Silva</td>
  236. <td>Marketing Designer</td>
  237. <td>London</td>
  238. <td>66</td>
  239. <td>2012/11/27</td>
  240. <td>$198,500</td>
  241. </tr>
  242. <tr>
  243. <td>Paul Byrd</td>
  244. <td>Chief Financial Officer (CFO)</td>
  245. <td>New York</td>
  246. <td>64</td>
  247. <td>2010/06/09</td>
  248. <td>$725,000</td>
  249. </tr>
  250. <tr>
  251. <td>Gloria Little</td>
  252. <td>Systems Administrator</td>
  253. <td>New York</td>
  254. <td>59</td>
  255. <td>2009/04/10</td>
  256. <td>$237,500</td>
  257. </tr>
  258. <tr>
  259. <td>Bradley Greer</td>
  260. <td>Software Engineer</td>
  261. <td>London</td>
  262. <td>41</td>
  263. <td>2012/10/13</td>
  264. <td>$132,000</td>
  265. </tr>
  266. <tr>
  267. <td>Dai Rios</td>
  268. <td>Personnel Lead</td>
  269. <td>Edinburgh</td>
  270. <td>35</td>
  271. <td>2012/09/26</td>
  272. <td>$217,500</td>
  273. </tr>
  274. <tr>
  275. <td>Jenette Caldwell</td>
  276. <td>Development Lead</td>
  277. <td>New York</td>
  278. <td>30</td>
  279. <td>2011/09/03</td>
  280. <td>$345,000</td>
  281. </tr>
  282. <tr>
  283. <td>Yuri Berry</td>
  284. <td>Chief Marketing Officer (CMO)</td>
  285. <td>New York</td>
  286. <td>40</td>
  287. <td>2009/06/25</td>
  288. <td>$675,000</td>
  289. </tr>
  290. <tr>
  291. <td>Caesar Vance</td>
  292. <td>Pre-Sales Support</td>
  293. <td>New York</td>
  294. <td>21</td>
  295. <td>2011/12/12</td>
  296. <td>$106,450</td>
  297. </tr>
  298. <tr>
  299. <td>Doris Wilder</td>
  300. <td>Sales Assistant</td>
  301. <td>Sidney</td>
  302. <td>23</td>
  303. <td>2010/09/20</td>
  304. <td>$85,600</td>
  305. </tr>
  306. <tr>
  307. <td>Angelica Ramos</td>
  308. <td>Chief Executive Officer (CEO)</td>
  309. <td>London</td>
  310. <td>47</td>
  311. <td>2009/10/09</td>
  312. <td>$1,200,000</td>
  313. </tr>
  314. <tr>
  315. <td>Gavin Joyce</td>
  316. <td>Developer</td>
  317. <td>Edinburgh</td>
  318. <td>42</td>
  319. <td>2010/12/22</td>
  320. <td>$92,575</td>
  321. </tr>
  322. <tr>
  323. <td>Jennifer Chang</td>
  324. <td>Regional Director</td>
  325. <td>Singapore</td>
  326. <td>28</td>
  327. <td>2010/11/14</td>
  328. <td>$357,650</td>
  329. </tr>
  330. <tr>
  331. <td>Brenden Wagner</td>
  332. <td>Software Engineer</td>
  333. <td>San Francisco</td>
  334. <td>28</td>
  335. <td>2011/06/07</td>
  336. <td>$206,850</td>
  337. </tr>
  338. <tr>
  339. <td>Fiona Green</td>
  340. <td>Chief Operating Officer (COO)</td>
  341. <td>San Francisco</td>
  342. <td>48</td>
  343. <td>2010/03/11</td>
  344. <td>$850,000</td>
  345. </tr>
  346. <tr>
  347. <td>Shou Itou</td>
  348. <td>Regional Marketing</td>
  349. <td>Tokyo</td>
  350. <td>20</td>
  351. <td>2011/08/14</td>
  352. <td>$163,000</td>
  353. </tr>
  354. <tr>
  355. <td>Michelle House</td>
  356. <td>Integration Specialist</td>
  357. <td>Sidney</td>
  358. <td>37</td>
  359. <td>2011/06/02</td>
  360. <td>$95,400</td>
  361. </tr>
  362. <tr>
  363. <td>Suki Burks</td>
  364. <td>Developer</td>
  365. <td>London</td>
  366. <td>53</td>
  367. <td>2009/10/22</td>
  368. <td>$114,500</td>
  369. </tr>
  370. <tr>
  371. <td>Prescott Bartlett</td>
  372. <td>Technical Author</td>
  373. <td>London</td>
  374. <td>27</td>
  375. <td>2011/05/07</td>
  376. <td>$145,000</td>
  377. </tr>
  378. <tr>
  379. <td>Gavin Cortez</td>
  380. <td>Team Leader</td>
  381. <td>San Francisco</td>
  382. <td>22</td>
  383. <td>2008/10/26</td>
  384. <td>$235,500</td>
  385. </tr>
  386. <tr>
  387. <td>Martena Mccray</td>
  388. <td>Post-Sales support</td>
  389. <td>Edinburgh</td>
  390. <td>46</td>
  391. <td>2011/03/09</td>
  392. <td>$324,050</td>
  393. </tr>
  394. <tr>
  395. <td>Unity Butler</td>
  396. <td>Marketing Designer</td>
  397. <td>San Francisco</td>
  398. <td>47</td>
  399. <td>2009/12/09</td>
  400. <td>$85,675</td>
  401. </tr>
  402. <tr>
  403. <td>Howard Hatfield</td>
  404. <td>Office Manager</td>
  405. <td>San Francisco</td>
  406. <td>51</td>
  407. <td>2008/12/16</td>
  408. <td>$164,500</td>
  409. </tr>
  410. <tr>
  411. <td>Hope Fuentes</td>
  412. <td>Secretary</td>
  413. <td>San Francisco</td>
  414. <td>41</td>
  415. <td>2010/02/12</td>
  416. <td>$109,850</td>
  417. </tr>
  418. <tr>
  419. <td>Vivian Harrell</td>
  420. <td>Financial Controller</td>
  421. <td>San Francisco</td>
  422. <td>62</td>
  423. <td>2009/02/14</td>
  424. <td>$452,500</td>
  425. </tr>
  426. <tr>
  427. <td>Timothy Mooney</td>
  428. <td>Office Manager</td>
  429. <td>London</td>
  430. <td>37</td>
  431. <td>2008/12/11</td>
  432. <td>$136,200</td>
  433. </tr>
  434. <tr>
  435. <td>Jackson Bradshaw</td>
  436. <td>Director</td>
  437. <td>New York</td>
  438. <td>65</td>
  439. <td>2008/09/26</td>
  440. <td>$645,750</td>
  441. </tr>
  442. <tr>
  443. <td>Olivia Liang</td>
  444. <td>Support Engineer</td>
  445. <td>Singapore</td>
  446. <td>64</td>
  447. <td>2011/02/03</td>
  448. <td>$234,500</td>
  449. </tr>
  450. <tr>
  451. <td>Bruno Nash</td>
  452. <td>Software Engineer</td>
  453. <td>London</td>
  454. <td>38</td>
  455. <td>2011/05/03</td>
  456. <td>$163,500</td>
  457. </tr>
  458. <tr>
  459. <td>Sakura Yamamoto</td>
  460. <td>Support Engineer</td>
  461. <td>Tokyo</td>
  462. <td>37</td>
  463. <td>2009/08/19</td>
  464. <td>$139,575</td>
  465. </tr>
  466. <tr>
  467. <td>Thor Walton</td>
  468. <td>Developer</td>
  469. <td>New York</td>
  470. <td>61</td>
  471. <td>2013/08/11</td>
  472. <td>$98,540</td>
  473. </tr>
  474. <tr>
  475. <td>Finn Camacho</td>
  476. <td>Support Engineer</td>
  477. <td>San Francisco</td>
  478. <td>47</td>
  479. <td>2009/07/07</td>
  480. <td>$87,500</td>
  481. </tr>
  482. <tr>
  483. <td>Serge Baldwin</td>
  484. <td>Data Coordinator</td>
  485. <td>Singapore</td>
  486. <td>64</td>
  487. <td>2012/04/09</td>
  488. <td>$138,575</td>
  489. </tr>
  490. <tr>
  491. <td>Zenaida Frank</td>
  492. <td>Software Engineer</td>
  493. <td>New York</td>
  494. <td>63</td>
  495. <td>2010/01/04</td>
  496. <td>$125,250</td>
  497. </tr>
  498. <tr>
  499. <td>Zorita Serrano</td>
  500. <td>Software Engineer</td>
  501. <td>San Francisco</td>
  502. <td>56</td>
  503. <td>2012/06/01</td>
  504. <td>$115,000</td>
  505. </tr>
  506. <tr>
  507. <td>Jennifer Acosta</td>
  508. <td>Junior Javascript Developer</td>
  509. <td>Edinburgh</td>
  510. <td>43</td>
  511. <td>2013/02/01</td>
  512. <td>$75,650</td>
  513. </tr>
  514. <tr>
  515. <td>Cara Stevens</td>
  516. <td>Sales Assistant</td>
  517. <td>New York</td>
  518. <td>46</td>
  519. <td>2011/12/06</td>
  520. <td>$145,600</td>
  521. </tr>
  522. <tr>
  523. <td>Hermione Butler</td>
  524. <td>Regional Director</td>
  525. <td>London</td>
  526. <td>47</td>
  527. <td>2011/03/21</td>
  528. <td>$356,250</td>
  529. </tr>
  530. <tr>
  531. <td>Lael Greer</td>
  532. <td>Systems Administrator</td>
  533. <td>London</td>
  534. <td>21</td>
  535. <td>2009/02/27</td>
  536. <td>$103,500</td>
  537. </tr>
  538. <tr>
  539. <td>Jonas Alexander</td>
  540. <td>Developer</td>
  541. <td>San Francisco</td>
  542. <td>30</td>
  543. <td>2010/07/14</td>
  544. <td>$86,500</td>
  545. </tr>
  546. <tr>
  547. <td>Shad Decker</td>
  548. <td>Regional Director</td>
  549. <td>Edinburgh</td>
  550. <td>51</td>
  551. <td>2008/11/13</td>
  552. <td>$183,000</td>
  553. </tr>
  554. <tr>
  555. <td>Michael Bruce</td>
  556. <td>Javascript Developer</td>
  557. <td>Singapore</td>
  558. <td>29</td>
  559. <td>2011/06/27</td>
  560. <td>$183,000</td>
  561. </tr>
  562. <tr>
  563. <td>Donna Snider</td>
  564. <td>Customer Support</td>
  565. <td>New York</td>
  566. <td>27</td>
  567. <td>2011/01/25</td>
  568. <td>$112,000</td>
  569. </tr>
  570. </tbody>
  571. </table>
  572. <ul class="tabs">
  573. <li class="active">Javascript</li>
  574. <li>HTML</li>
  575. <li>CSS</li>
  576. <li>Ajax</li>
  577. <li>Server-side script</li>
  578. </ul>
  579. <div class="tabs">
  580. <div class="js">
  581. <p>The Javascript shown below is used to initialise the table shown in this
  582. example:</p><code class="multiline brush: js;">function eventMsg ( msg ) {
  583. var n = document.getElementById('info');
  584. n.innerHTML += msg+&quot;&lt;br&gt;&quot;;
  585. n.scrollTop = n.scrollHeight;
  586. }
  587. $(document).ready(function() {
  588. var table = $('#example').DataTable();
  589. var keys = new $.fn.dataTable.KeyTable( table );
  590. /* Focus handler for all cells in last column */
  591. keys.event.focus( 4, null, function( node, x, y ) {
  592. eventMsg( &quot;Cell &quot;+x+&quot;,&quot;+y+&quot; focused ('live' event - column)&quot; );
  593. } );
  594. /* Focus handler for all cells in 8th row */
  595. keys.event.focus( null, 7, function( node, x, y ) {
  596. eventMsg( &quot;Cell &quot;+x+&quot;,&quot;+y+&quot; focused ('live' event - row)&quot; );
  597. } );
  598. /* Focus using coords. */
  599. keys.event.focus( 1, 0, function( node ) {
  600. keys.event.remove.focus( node );
  601. eventMsg( &quot;Cell 1,0 focus - this event has now been removed&quot; );
  602. } );
  603. keys.event.focus( 1, 3, function() {
  604. eventMsg( &quot;Cell 1,3 focus&quot; );
  605. } );
  606. /* focus with a node */
  607. keys.event.focus( $('#example tbody tr:eq(2) td:eq(0)')[0], function() {
  608. eventMsg( &quot;Cell 0,2 focus&quot; );
  609. } );
  610. /* Blur using a node */
  611. keys.event.blur( $('#example tbody tr:eq(1) td:eq(2)')[0], function() {
  612. eventMsg( &quot;Cell 1,2 blur&quot; );
  613. } );
  614. /* Blur using coords */
  615. keys.event.blur( 2, 4, function() {
  616. eventMsg( &quot;Cell 2,4 blur&quot; );
  617. } );
  618. /* Action */
  619. keys.event.action( 2, 2, function( node ) {
  620. eventMsg( &quot;Cell 2,2 action&quot; );
  621. if ( node.style.fontWeight == &quot;&quot; || node.style.fontWeight == &quot;normal&quot; ) {
  622. node.style.fontWeight = &quot;bold&quot;;
  623. }
  624. else {
  625. node.style.fontWeight = &quot;normal&quot;;
  626. }
  627. } );
  628. keys.event.action( 2, 5, function( node ) {
  629. eventMsg( &quot;Cell 2,5 action&quot; );
  630. if ( node.style.fontStyle == &quot;&quot; ) {
  631. node.style.fontStyle = &quot;italic&quot;;
  632. }
  633. else {
  634. node.style.fontStyle = &quot;&quot;;
  635. }
  636. } );
  637. } );</code>
  638. <p>In addition to the above code, the following Javascript library files are loaded for use in this
  639. example:</p>
  640. <ul>
  641. <li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
  642. <li><a href=
  643. "../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
  644. <li><a href="../js/dataTables.keyTable.js">../js/dataTables.keyTable.js</a></li>
  645. </ul>
  646. </div>
  647. <div class="table">
  648. <p>The HTML shown below is the raw HTML table element, before it has been enhanced by
  649. DataTables:</p>
  650. </div>
  651. <div class="css">
  652. <div>
  653. <p>This example uses a little bit of additional CSS beyond what is loaded from the library
  654. files (below), in order to correctly display the table. The additional CSS used is shown
  655. below:</p><code class="multiline brush: js;"></code>
  656. </div>
  657. <p>The following CSS library files are loaded for use in this example to provide the styling of the
  658. table:</p>
  659. <ul>
  660. <li><a href=
  661. "../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
  662. <li><a href="../css/dataTables.keyTable.css">../css/dataTables.keyTable.css</a></li>
  663. </ul>
  664. </div>
  665. <div class="ajax">
  666. <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
  667. will update automatically as any additional data is loaded.</p>
  668. </div>
  669. <div class="php">
  670. <p>The script used to perform the server-side processing for this table is shown below. Please note
  671. that this is just an example script using PHP. Server-side processing scripts can be written in any
  672. language, using <a href="//datatables.net/manual/server-side">the protocol described in the
  673. DataTables documentation</a>.</p>
  674. </div>
  675. </div>
  676. </section>
  677. </div>
  678. <section>
  679. <div class="footer">
  680. <div class="gradient"></div>
  681. <div class="liner">
  682. <h2>Other examples</h2>
  683. <div class="toc">
  684. <div class="toc-group">
  685. <h3><a href="./index.html">Examples</a></h3>
  686. <ul class="toc active">
  687. <li><a href="./simple.html">Basic initialisation</a></li>
  688. <li class="active"><a href="./events.html">Events</a></li>
  689. <li><a href="./scrolling.html">Scrolling table</a></li>
  690. <li><a href="./html.html">Plain HTML table</a></li>
  691. </ul>
  692. </div>
  693. </div>
  694. <div class="epilogue">
  695. <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
  696. information about its API properties and methods.<br>
  697. Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
  698. <a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
  699. DataTables.</p>
  700. <p class="copyright">DataTables designed and created by <a href=
  701. "http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
  702. DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
  703. </div>
  704. </div>
  705. </div>
  706. </section>
  707. </body>
  708. </html>