colvis.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  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>FixedColumns example - ColVis integration</title>
  8. <link rel="stylesheet" type="text/css" href="../../../media/css/jquery.dataTables.css">
  9. <link rel="stylesheet" type="text/css" href="../../ColVis/css/dataTables.colVis.css">
  10. <link rel="stylesheet" type="text/css" href="../css/dataTables.fixedColumns.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">
  14. /* Ensure that the demo table scrolls */
  15. th, td { white-space: nowrap; }
  16. div.dataTables_wrapper {
  17. width: 800px;
  18. margin: 0 auto;
  19. }
  20. div.ColVis {
  21. float: left;
  22. }
  23. </style>
  24. <script type="text/javascript" language="javascript" src="../../../media/js/jquery.js"></script>
  25. <script type="text/javascript" language="javascript" src="../../../media/js/jquery.dataTables.js"></script>
  26. <script type="text/javascript" language="javascript" src="../../ColVis/js/dataTables.colVis.js"></script>
  27. <script type="text/javascript" language="javascript" src="../js/dataTables.fixedColumns.js"></script>
  28. <script type="text/javascript" language="javascript" src="../../../examples/resources/syntax/shCore.js"></script>
  29. <script type="text/javascript" language="javascript" src="../../../examples/resources/demo.js"></script>
  30. <script type="text/javascript" language="javascript" class="init">
  31. $(document).ready(function() {
  32. var table = $('#example').DataTable( {
  33. dom: "Cfrtip",
  34. scrollY: "300px",
  35. scrollX: true,
  36. scrollCollapse: true,
  37. paging: false
  38. } );
  39. new $.fn.dataTable.FixedColumns( table, {
  40. leftColumns: 2
  41. } );
  42. } );
  43. </script>
  44. </head>
  45. <body class="dt-example">
  46. <div class="container">
  47. <section>
  48. <h1>FixedColumns example <span>ColVis integration</span></h1>
  49. <div class="info">
  50. <p>FixedColumns operates with DataTables' built-in column visibility options (<a href=
  51. "//datatables.net/reference/option/columns.visible"><code class="option" title=
  52. "DataTables initialisation option">columns.visible<span>DT</span></code></a> and <a href=
  53. "//datatables.net/reference/api/column().visible()"><code class="api" title=
  54. "DataTables API method">column().visible()<span>DT</span></code></a>), which columns that are hidden
  55. not being shown in the fixed columns. This integration also means that FixedColumns works well with
  56. <a href="http://datatables.net/extensions/colvis">ColVis</a>, with columns that are dynamically shown
  57. and hidden updated immediately in the fixed columns.</p>
  58. <p>The example below shows ColVis and FixedColumns working together. Two columns have been fixed on the
  59. left hand side of the table to show FixedColumns ability to work effortlessly with column
  60. visibility.</p>
  61. </div>
  62. <table id="example" class="stripe row-border order-column" cellspacing="0" width="100%">
  63. <thead>
  64. <tr>
  65. <th>First name</th>
  66. <th>Last name</th>
  67. <th>Position</th>
  68. <th>Office</th>
  69. <th>Age</th>
  70. <th>Start date</th>
  71. <th>Salary</th>
  72. <th>Extn.</th>
  73. <th>E-mail</th>
  74. </tr>
  75. </thead>
  76. <tbody>
  77. <tr>
  78. <td>Tiger</td>
  79. <td>Nixon</td>
  80. <td>System Architect</td>
  81. <td>Edinburgh</td>
  82. <td>61</td>
  83. <td>2011/04/25</td>
  84. <td>$320,800</td>
  85. <td>5421</td>
  86. <td>t.nixon@datatables.net</td>
  87. </tr>
  88. <tr>
  89. <td>Garrett</td>
  90. <td>Winters</td>
  91. <td>Accountant</td>
  92. <td>Tokyo</td>
  93. <td>63</td>
  94. <td>2011/07/25</td>
  95. <td>$170,750</td>
  96. <td>8422</td>
  97. <td>g.winters@datatables.net</td>
  98. </tr>
  99. <tr>
  100. <td>Ashton</td>
  101. <td>Cox</td>
  102. <td>Junior Technical Author</td>
  103. <td>San Francisco</td>
  104. <td>66</td>
  105. <td>2009/01/12</td>
  106. <td>$86,000</td>
  107. <td>1562</td>
  108. <td>a.cox@datatables.net</td>
  109. </tr>
  110. <tr>
  111. <td>Cedric</td>
  112. <td>Kelly</td>
  113. <td>Senior Javascript Developer</td>
  114. <td>Edinburgh</td>
  115. <td>22</td>
  116. <td>2012/03/29</td>
  117. <td>$433,060</td>
  118. <td>6224</td>
  119. <td>c.kelly@datatables.net</td>
  120. </tr>
  121. <tr>
  122. <td>Airi</td>
  123. <td>Satou</td>
  124. <td>Accountant</td>
  125. <td>Tokyo</td>
  126. <td>33</td>
  127. <td>2008/11/28</td>
  128. <td>$162,700</td>
  129. <td>5407</td>
  130. <td>a.satou@datatables.net</td>
  131. </tr>
  132. <tr>
  133. <td>Brielle</td>
  134. <td>Williamson</td>
  135. <td>Integration Specialist</td>
  136. <td>New York</td>
  137. <td>61</td>
  138. <td>2012/12/02</td>
  139. <td>$372,000</td>
  140. <td>4804</td>
  141. <td>b.williamson@datatables.net</td>
  142. </tr>
  143. <tr>
  144. <td>Herrod</td>
  145. <td>Chandler</td>
  146. <td>Sales Assistant</td>
  147. <td>San Francisco</td>
  148. <td>59</td>
  149. <td>2012/08/06</td>
  150. <td>$137,500</td>
  151. <td>9608</td>
  152. <td>h.chandler@datatables.net</td>
  153. </tr>
  154. <tr>
  155. <td>Rhona</td>
  156. <td>Davidson</td>
  157. <td>Integration Specialist</td>
  158. <td>Tokyo</td>
  159. <td>55</td>
  160. <td>2010/10/14</td>
  161. <td>$327,900</td>
  162. <td>6200</td>
  163. <td>r.davidson@datatables.net</td>
  164. </tr>
  165. <tr>
  166. <td>Colleen</td>
  167. <td>Hurst</td>
  168. <td>Javascript Developer</td>
  169. <td>San Francisco</td>
  170. <td>39</td>
  171. <td>2009/09/15</td>
  172. <td>$205,500</td>
  173. <td>2360</td>
  174. <td>c.hurst@datatables.net</td>
  175. </tr>
  176. <tr>
  177. <td>Sonya</td>
  178. <td>Frost</td>
  179. <td>Software Engineer</td>
  180. <td>Edinburgh</td>
  181. <td>23</td>
  182. <td>2008/12/13</td>
  183. <td>$103,600</td>
  184. <td>1667</td>
  185. <td>s.frost@datatables.net</td>
  186. </tr>
  187. <tr>
  188. <td>Jena</td>
  189. <td>Gaines</td>
  190. <td>Office Manager</td>
  191. <td>London</td>
  192. <td>30</td>
  193. <td>2008/12/19</td>
  194. <td>$90,560</td>
  195. <td>3814</td>
  196. <td>j.gaines@datatables.net</td>
  197. </tr>
  198. <tr>
  199. <td>Quinn</td>
  200. <td>Flynn</td>
  201. <td>Support Lead</td>
  202. <td>Edinburgh</td>
  203. <td>22</td>
  204. <td>2013/03/03</td>
  205. <td>$342,000</td>
  206. <td>9497</td>
  207. <td>q.flynn@datatables.net</td>
  208. </tr>
  209. <tr>
  210. <td>Charde</td>
  211. <td>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. <td>6741</td>
  218. <td>c.marshall@datatables.net</td>
  219. </tr>
  220. <tr>
  221. <td>Haley</td>
  222. <td>Kennedy</td>
  223. <td>Senior Marketing Designer</td>
  224. <td>London</td>
  225. <td>43</td>
  226. <td>2012/12/18</td>
  227. <td>$313,500</td>
  228. <td>3597</td>
  229. <td>h.kennedy@datatables.net</td>
  230. </tr>
  231. <tr>
  232. <td>Tatyana</td>
  233. <td>Fitzpatrick</td>
  234. <td>Regional Director</td>
  235. <td>London</td>
  236. <td>19</td>
  237. <td>2010/03/17</td>
  238. <td>$385,750</td>
  239. <td>1965</td>
  240. <td>t.fitzpatrick@datatables.net</td>
  241. </tr>
  242. <tr>
  243. <td>Michael</td>
  244. <td>Silva</td>
  245. <td>Marketing Designer</td>
  246. <td>London</td>
  247. <td>66</td>
  248. <td>2012/11/27</td>
  249. <td>$198,500</td>
  250. <td>1581</td>
  251. <td>m.silva@datatables.net</td>
  252. </tr>
  253. <tr>
  254. <td>Paul</td>
  255. <td>Byrd</td>
  256. <td>Chief Financial Officer (CFO)</td>
  257. <td>New York</td>
  258. <td>64</td>
  259. <td>2010/06/09</td>
  260. <td>$725,000</td>
  261. <td>3059</td>
  262. <td>p.byrd@datatables.net</td>
  263. </tr>
  264. <tr>
  265. <td>Gloria</td>
  266. <td>Little</td>
  267. <td>Systems Administrator</td>
  268. <td>New York</td>
  269. <td>59</td>
  270. <td>2009/04/10</td>
  271. <td>$237,500</td>
  272. <td>1721</td>
  273. <td>g.little@datatables.net</td>
  274. </tr>
  275. <tr>
  276. <td>Bradley</td>
  277. <td>Greer</td>
  278. <td>Software Engineer</td>
  279. <td>London</td>
  280. <td>41</td>
  281. <td>2012/10/13</td>
  282. <td>$132,000</td>
  283. <td>2558</td>
  284. <td>b.greer@datatables.net</td>
  285. </tr>
  286. <tr>
  287. <td>Dai</td>
  288. <td>Rios</td>
  289. <td>Personnel Lead</td>
  290. <td>Edinburgh</td>
  291. <td>35</td>
  292. <td>2012/09/26</td>
  293. <td>$217,500</td>
  294. <td>2290</td>
  295. <td>d.rios@datatables.net</td>
  296. </tr>
  297. <tr>
  298. <td>Jenette</td>
  299. <td>Caldwell</td>
  300. <td>Development Lead</td>
  301. <td>New York</td>
  302. <td>30</td>
  303. <td>2011/09/03</td>
  304. <td>$345,000</td>
  305. <td>1937</td>
  306. <td>j.caldwell@datatables.net</td>
  307. </tr>
  308. <tr>
  309. <td>Yuri</td>
  310. <td>Berry</td>
  311. <td>Chief Marketing Officer (CMO)</td>
  312. <td>New York</td>
  313. <td>40</td>
  314. <td>2009/06/25</td>
  315. <td>$675,000</td>
  316. <td>6154</td>
  317. <td>y.berry@datatables.net</td>
  318. </tr>
  319. <tr>
  320. <td>Caesar</td>
  321. <td>Vance</td>
  322. <td>Pre-Sales Support</td>
  323. <td>New York</td>
  324. <td>21</td>
  325. <td>2011/12/12</td>
  326. <td>$106,450</td>
  327. <td>8330</td>
  328. <td>c.vance@datatables.net</td>
  329. </tr>
  330. <tr>
  331. <td>Doris</td>
  332. <td>Wilder</td>
  333. <td>Sales Assistant</td>
  334. <td>Sidney</td>
  335. <td>23</td>
  336. <td>2010/09/20</td>
  337. <td>$85,600</td>
  338. <td>3023</td>
  339. <td>d.wilder@datatables.net</td>
  340. </tr>
  341. <tr>
  342. <td>Angelica</td>
  343. <td>Ramos</td>
  344. <td>Chief Executive Officer (CEO)</td>
  345. <td>London</td>
  346. <td>47</td>
  347. <td>2009/10/09</td>
  348. <td>$1,200,000</td>
  349. <td>5797</td>
  350. <td>a.ramos@datatables.net</td>
  351. </tr>
  352. <tr>
  353. <td>Gavin</td>
  354. <td>Joyce</td>
  355. <td>Developer</td>
  356. <td>Edinburgh</td>
  357. <td>42</td>
  358. <td>2010/12/22</td>
  359. <td>$92,575</td>
  360. <td>8822</td>
  361. <td>g.joyce@datatables.net</td>
  362. </tr>
  363. <tr>
  364. <td>Jennifer</td>
  365. <td>Chang</td>
  366. <td>Regional Director</td>
  367. <td>Singapore</td>
  368. <td>28</td>
  369. <td>2010/11/14</td>
  370. <td>$357,650</td>
  371. <td>9239</td>
  372. <td>j.chang@datatables.net</td>
  373. </tr>
  374. <tr>
  375. <td>Brenden</td>
  376. <td>Wagner</td>
  377. <td>Software Engineer</td>
  378. <td>San Francisco</td>
  379. <td>28</td>
  380. <td>2011/06/07</td>
  381. <td>$206,850</td>
  382. <td>1314</td>
  383. <td>b.wagner@datatables.net</td>
  384. </tr>
  385. <tr>
  386. <td>Fiona</td>
  387. <td>Green</td>
  388. <td>Chief Operating Officer (COO)</td>
  389. <td>San Francisco</td>
  390. <td>48</td>
  391. <td>2010/03/11</td>
  392. <td>$850,000</td>
  393. <td>2947</td>
  394. <td>f.green@datatables.net</td>
  395. </tr>
  396. <tr>
  397. <td>Shou</td>
  398. <td>Itou</td>
  399. <td>Regional Marketing</td>
  400. <td>Tokyo</td>
  401. <td>20</td>
  402. <td>2011/08/14</td>
  403. <td>$163,000</td>
  404. <td>8899</td>
  405. <td>s.itou@datatables.net</td>
  406. </tr>
  407. <tr>
  408. <td>Michelle</td>
  409. <td>House</td>
  410. <td>Integration Specialist</td>
  411. <td>Sidney</td>
  412. <td>37</td>
  413. <td>2011/06/02</td>
  414. <td>$95,400</td>
  415. <td>2769</td>
  416. <td>m.house@datatables.net</td>
  417. </tr>
  418. <tr>
  419. <td>Suki</td>
  420. <td>Burks</td>
  421. <td>Developer</td>
  422. <td>London</td>
  423. <td>53</td>
  424. <td>2009/10/22</td>
  425. <td>$114,500</td>
  426. <td>6832</td>
  427. <td>s.burks@datatables.net</td>
  428. </tr>
  429. <tr>
  430. <td>Prescott</td>
  431. <td>Bartlett</td>
  432. <td>Technical Author</td>
  433. <td>London</td>
  434. <td>27</td>
  435. <td>2011/05/07</td>
  436. <td>$145,000</td>
  437. <td>3606</td>
  438. <td>p.bartlett@datatables.net</td>
  439. </tr>
  440. <tr>
  441. <td>Gavin</td>
  442. <td>Cortez</td>
  443. <td>Team Leader</td>
  444. <td>San Francisco</td>
  445. <td>22</td>
  446. <td>2008/10/26</td>
  447. <td>$235,500</td>
  448. <td>2860</td>
  449. <td>g.cortez@datatables.net</td>
  450. </tr>
  451. <tr>
  452. <td>Martena</td>
  453. <td>Mccray</td>
  454. <td>Post-Sales support</td>
  455. <td>Edinburgh</td>
  456. <td>46</td>
  457. <td>2011/03/09</td>
  458. <td>$324,050</td>
  459. <td>8240</td>
  460. <td>m.mccray@datatables.net</td>
  461. </tr>
  462. <tr>
  463. <td>Unity</td>
  464. <td>Butler</td>
  465. <td>Marketing Designer</td>
  466. <td>San Francisco</td>
  467. <td>47</td>
  468. <td>2009/12/09</td>
  469. <td>$85,675</td>
  470. <td>5384</td>
  471. <td>u.butler@datatables.net</td>
  472. </tr>
  473. <tr>
  474. <td>Howard</td>
  475. <td>Hatfield</td>
  476. <td>Office Manager</td>
  477. <td>San Francisco</td>
  478. <td>51</td>
  479. <td>2008/12/16</td>
  480. <td>$164,500</td>
  481. <td>7031</td>
  482. <td>h.hatfield@datatables.net</td>
  483. </tr>
  484. <tr>
  485. <td>Hope</td>
  486. <td>Fuentes</td>
  487. <td>Secretary</td>
  488. <td>San Francisco</td>
  489. <td>41</td>
  490. <td>2010/02/12</td>
  491. <td>$109,850</td>
  492. <td>6318</td>
  493. <td>h.fuentes@datatables.net</td>
  494. </tr>
  495. <tr>
  496. <td>Vivian</td>
  497. <td>Harrell</td>
  498. <td>Financial Controller</td>
  499. <td>San Francisco</td>
  500. <td>62</td>
  501. <td>2009/02/14</td>
  502. <td>$452,500</td>
  503. <td>9422</td>
  504. <td>v.harrell@datatables.net</td>
  505. </tr>
  506. <tr>
  507. <td>Timothy</td>
  508. <td>Mooney</td>
  509. <td>Office Manager</td>
  510. <td>London</td>
  511. <td>37</td>
  512. <td>2008/12/11</td>
  513. <td>$136,200</td>
  514. <td>7580</td>
  515. <td>t.mooney@datatables.net</td>
  516. </tr>
  517. <tr>
  518. <td>Jackson</td>
  519. <td>Bradshaw</td>
  520. <td>Director</td>
  521. <td>New York</td>
  522. <td>65</td>
  523. <td>2008/09/26</td>
  524. <td>$645,750</td>
  525. <td>1042</td>
  526. <td>j.bradshaw@datatables.net</td>
  527. </tr>
  528. <tr>
  529. <td>Olivia</td>
  530. <td>Liang</td>
  531. <td>Support Engineer</td>
  532. <td>Singapore</td>
  533. <td>64</td>
  534. <td>2011/02/03</td>
  535. <td>$234,500</td>
  536. <td>2120</td>
  537. <td>o.liang@datatables.net</td>
  538. </tr>
  539. <tr>
  540. <td>Bruno</td>
  541. <td>Nash</td>
  542. <td>Software Engineer</td>
  543. <td>London</td>
  544. <td>38</td>
  545. <td>2011/05/03</td>
  546. <td>$163,500</td>
  547. <td>6222</td>
  548. <td>b.nash@datatables.net</td>
  549. </tr>
  550. <tr>
  551. <td>Sakura</td>
  552. <td>Yamamoto</td>
  553. <td>Support Engineer</td>
  554. <td>Tokyo</td>
  555. <td>37</td>
  556. <td>2009/08/19</td>
  557. <td>$139,575</td>
  558. <td>9383</td>
  559. <td>s.yamamoto@datatables.net</td>
  560. </tr>
  561. <tr>
  562. <td>Thor</td>
  563. <td>Walton</td>
  564. <td>Developer</td>
  565. <td>New York</td>
  566. <td>61</td>
  567. <td>2013/08/11</td>
  568. <td>$98,540</td>
  569. <td>8327</td>
  570. <td>t.walton@datatables.net</td>
  571. </tr>
  572. <tr>
  573. <td>Finn</td>
  574. <td>Camacho</td>
  575. <td>Support Engineer</td>
  576. <td>San Francisco</td>
  577. <td>47</td>
  578. <td>2009/07/07</td>
  579. <td>$87,500</td>
  580. <td>2927</td>
  581. <td>f.camacho@datatables.net</td>
  582. </tr>
  583. <tr>
  584. <td>Serge</td>
  585. <td>Baldwin</td>
  586. <td>Data Coordinator</td>
  587. <td>Singapore</td>
  588. <td>64</td>
  589. <td>2012/04/09</td>
  590. <td>$138,575</td>
  591. <td>8352</td>
  592. <td>s.baldwin@datatables.net</td>
  593. </tr>
  594. <tr>
  595. <td>Zenaida</td>
  596. <td>Frank</td>
  597. <td>Software Engineer</td>
  598. <td>New York</td>
  599. <td>63</td>
  600. <td>2010/01/04</td>
  601. <td>$125,250</td>
  602. <td>7439</td>
  603. <td>z.frank@datatables.net</td>
  604. </tr>
  605. <tr>
  606. <td>Zorita</td>
  607. <td>Serrano</td>
  608. <td>Software Engineer</td>
  609. <td>San Francisco</td>
  610. <td>56</td>
  611. <td>2012/06/01</td>
  612. <td>$115,000</td>
  613. <td>4389</td>
  614. <td>z.serrano@datatables.net</td>
  615. </tr>
  616. <tr>
  617. <td>Jennifer</td>
  618. <td>Acosta</td>
  619. <td>Junior Javascript Developer</td>
  620. <td>Edinburgh</td>
  621. <td>43</td>
  622. <td>2013/02/01</td>
  623. <td>$75,650</td>
  624. <td>3431</td>
  625. <td>j.acosta@datatables.net</td>
  626. </tr>
  627. <tr>
  628. <td>Cara</td>
  629. <td>Stevens</td>
  630. <td>Sales Assistant</td>
  631. <td>New York</td>
  632. <td>46</td>
  633. <td>2011/12/06</td>
  634. <td>$145,600</td>
  635. <td>3990</td>
  636. <td>c.stevens@datatables.net</td>
  637. </tr>
  638. <tr>
  639. <td>Hermione</td>
  640. <td>Butler</td>
  641. <td>Regional Director</td>
  642. <td>London</td>
  643. <td>47</td>
  644. <td>2011/03/21</td>
  645. <td>$356,250</td>
  646. <td>1016</td>
  647. <td>h.butler@datatables.net</td>
  648. </tr>
  649. <tr>
  650. <td>Lael</td>
  651. <td>Greer</td>
  652. <td>Systems Administrator</td>
  653. <td>London</td>
  654. <td>21</td>
  655. <td>2009/02/27</td>
  656. <td>$103,500</td>
  657. <td>6733</td>
  658. <td>l.greer@datatables.net</td>
  659. </tr>
  660. <tr>
  661. <td>Jonas</td>
  662. <td>Alexander</td>
  663. <td>Developer</td>
  664. <td>San Francisco</td>
  665. <td>30</td>
  666. <td>2010/07/14</td>
  667. <td>$86,500</td>
  668. <td>8196</td>
  669. <td>j.alexander@datatables.net</td>
  670. </tr>
  671. <tr>
  672. <td>Shad</td>
  673. <td>Decker</td>
  674. <td>Regional Director</td>
  675. <td>Edinburgh</td>
  676. <td>51</td>
  677. <td>2008/11/13</td>
  678. <td>$183,000</td>
  679. <td>6373</td>
  680. <td>s.decker@datatables.net</td>
  681. </tr>
  682. <tr>
  683. <td>Michael</td>
  684. <td>Bruce</td>
  685. <td>Javascript Developer</td>
  686. <td>Singapore</td>
  687. <td>29</td>
  688. <td>2011/06/27</td>
  689. <td>$183,000</td>
  690. <td>5384</td>
  691. <td>m.bruce@datatables.net</td>
  692. </tr>
  693. <tr>
  694. <td>Donna</td>
  695. <td>Snider</td>
  696. <td>Customer Support</td>
  697. <td>New York</td>
  698. <td>27</td>
  699. <td>2011/01/25</td>
  700. <td>$112,000</td>
  701. <td>4226</td>
  702. <td>d.snider@datatables.net</td>
  703. </tr>
  704. </tbody>
  705. </table>
  706. <ul class="tabs">
  707. <li class="active">Javascript</li>
  708. <li>HTML</li>
  709. <li>CSS</li>
  710. <li>Ajax</li>
  711. <li>Server-side script</li>
  712. </ul>
  713. <div class="tabs">
  714. <div class="js">
  715. <p>The Javascript shown below is used to initialise the table shown in this
  716. example:</p><code class="multiline brush: js;">$(document).ready(function() {
  717. var table = $('#example').DataTable( {
  718. dom: &quot;Cfrtip&quot;,
  719. scrollY: &quot;300px&quot;,
  720. scrollX: true,
  721. scrollCollapse: true,
  722. paging: false
  723. } );
  724. new $.fn.dataTable.FixedColumns( table, {
  725. leftColumns: 2
  726. } );
  727. } );</code>
  728. <p>In addition to the above code, the following Javascript library files are loaded for use in this
  729. example:</p>
  730. <ul>
  731. <li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
  732. <li><a href=
  733. "../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
  734. <li><a href=
  735. "../../ColVis/js/dataTables.colVis.js">../../ColVis/js/dataTables.colVis.js</a></li>
  736. <li><a href="../js/dataTables.fixedColumns.js">../js/dataTables.fixedColumns.js</a></li>
  737. </ul>
  738. </div>
  739. <div class="table">
  740. <p>The HTML shown below is the raw HTML table element, before it has been enhanced by
  741. DataTables:</p>
  742. </div>
  743. <div class="css">
  744. <div>
  745. <p>This example uses a little bit of additional CSS beyond what is loaded from the library
  746. files (below), in order to correctly display the table. The additional CSS used is shown
  747. below:</p><code class="multiline brush: js;">/* Ensure that the demo table scrolls */
  748. th, td { white-space: nowrap; }
  749. div.dataTables_wrapper {
  750. width: 800px;
  751. margin: 0 auto;
  752. }
  753. div.ColVis {
  754. float: left;
  755. }</code>
  756. </div>
  757. <p>The following CSS library files are loaded for use in this example to provide the styling of the
  758. table:</p>
  759. <ul>
  760. <li><a href=
  761. "../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
  762. <li><a href=
  763. "../../ColVis/css/dataTables.colVis.css">../../ColVis/css/dataTables.colVis.css</a></li>
  764. <li><a href="../css/dataTables.fixedColumns.css">../css/dataTables.fixedColumns.css</a></li>
  765. </ul>
  766. </div>
  767. <div class="ajax">
  768. <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
  769. will update automatically as any additional data is loaded.</p>
  770. </div>
  771. <div class="php">
  772. <p>The script used to perform the server-side processing for this table is shown below. Please note
  773. that this is just an example script using PHP. Server-side processing scripts can be written in any
  774. language, using <a href="//datatables.net/manual/server-side">the protocol described in the
  775. DataTables documentation</a>.</p>
  776. </div>
  777. </div>
  778. </section>
  779. </div>
  780. <section>
  781. <div class="footer">
  782. <div class="gradient"></div>
  783. <div class="liner">
  784. <h2>Other examples</h2>
  785. <div class="toc">
  786. <div class="toc-group">
  787. <h3><a href="./index.html">Examples</a></h3>
  788. <ul class="toc active">
  789. <li><a href="./left_right_columns.html">Left and right fixed columns</a></li>
  790. <li><a href="./simple.html">Basic initialisation</a></li>
  791. <li><a href="./two_columns.html">Multiple fixed columns</a></li>
  792. <li><a href="./right_column.html">Right column only</a></li>
  793. <li><a href="./rowspan.html">Complex headers</a></li>
  794. <li class="active"><a href="./colvis.html">ColVis integration</a></li>
  795. <li><a href="./server-side-processing.html">Server-side processing</a></li>
  796. <li><a href="./css_size.html">CSS row sizing</a></li>
  797. <li><a href="./size_fixed.html">Assigned column width</a></li>
  798. <li><a href="./size_fluid.html">Fluid column width</a></li>
  799. <li><a href="./col_filter.html">Individual column filtering</a></li>
  800. <li><a href="./bootstrap.html">Bootstrap</a></li>
  801. <li><a href="./index_column.html">Index column</a></li>
  802. </ul>
  803. </div>
  804. </div>
  805. <div class="epilogue">
  806. <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
  807. information about its API properties and methods.<br>
  808. Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
  809. <a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
  810. DataTables.</p>
  811. <p class="copyright">DataTables designed and created by <a href=
  812. "http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
  813. DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
  814. </div>
  815. </div>
  816. </div>
  817. </section>
  818. </body>
  819. </html>