two_columns.html 21 KB

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