Dashboard sipadu mbip
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

data-table-custom.js 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  1. $(document).ready(function() {
  2. setTimeout(function(){
  3. // Plugin data table
  4. $.fn.dataTable.Api.register('column().data().sum()', function() {
  5. return this.reduce(function(a, b) {
  6. var x = parseFloat(a) || 0;
  7. var y = parseFloat(b) || 0;
  8. return x + y;
  9. });
  10. });
  11. /* Init the table and fire off a call to get the hidden nodes. */
  12. var table = $('#dt-plugin-method').DataTable();
  13. $('<button class="btn btn-primary m-b-20">sum of age in all rows</button>')
  14. .prependTo('.dt-plugin-buttons')
  15. .on('click', function() {
  16. alert('Column sum is: ' + table.column(3).data().sum());
  17. });
  18. $('<button class="btn btn-primary m-r-10 m-b-20">sum of age of visible rows</button>')
  19. .prependTo('.dt-plugin-buttons')
  20. .on('click', function() {
  21. alert('Column sum is: ' + table.column(3, { page: 'current' }).data().sum());
  22. });
  23. $.fn.dataTable.ext.type.detect.unshift(
  24. function(d) {
  25. return d === 'Low' || d === 'Medium' || d === 'High' ?
  26. 'salary-grade' :
  27. null;
  28. }
  29. );
  30. $.fn.dataTable.ext.type.order['salary-grade-pre'] = function(d) {
  31. switch (d) {
  32. case 'Low':
  33. return 1;
  34. case 'Medium':
  35. return 2;
  36. case 'High':
  37. return 3;
  38. }
  39. return 0;
  40. };
  41. $('#dt-ordering').DataTable();
  42. /* Custom filtering function which will search data in column four between two values */
  43. $.fn.dataTable.ext.search.push(
  44. function(settings, data, dataIndex) {
  45. var min = parseInt($('#min').val(), 10);
  46. var max = parseInt($('#max').val(), 10);
  47. var age = parseFloat(data[3]) || 0; // use data for the age column
  48. if ((isNaN(min) && isNaN(max)) ||
  49. (isNaN(min) && age <= max) ||
  50. (min <= age && isNaN(max)) ||
  51. (min <= age && age <= max)) {
  52. return true;
  53. }
  54. return false;
  55. }
  56. );
  57. var dtage = $('#dt-range').DataTable();
  58. // Event listener to the two range filtering inputs to redraw on input
  59. $('#min, #max').keyup(function() {
  60. dtage.draw();
  61. });
  62. /* Create an array with the values of all the input boxes in a column */
  63. $.fn.dataTable.ext.order['dom-text'] = function(settings, col) {
  64. return this.api().column(col, { order: 'index' }).nodes().map(function(td, i) {
  65. return $('input', td).val();
  66. });
  67. }
  68. /* Create an array with the values of all the input boxes in a column, parsed as numbers */
  69. $.fn.dataTable.ext.order['dom-text-numeric'] = function(settings, col) {
  70. return this.api().column(col, { order: 'index' }).nodes().map(function(td, i) {
  71. return $('input', td).val() * 1;
  72. });
  73. }
  74. /* Create an array with the values of all the select options in a column */
  75. $.fn.dataTable.ext.order['dom-select'] = function(settings, col) {
  76. return this.api().column(col, { order: 'index' }).nodes().map(function(td, i) {
  77. return $('select', td).val();
  78. });
  79. }
  80. /* Create an array with the values of all the checkboxes in a column */
  81. $.fn.dataTable.ext.order['dom-checkbox'] = function(settings, col) {
  82. return this.api().column(col, { order: 'index' }).nodes().map(function(td, i) {
  83. return $('input', td).prop('checked') ? '1' : '0';
  84. });
  85. }
  86. /* Initialise the table with the required column ordering data types */
  87. $(document).ready(function() {
  88. $('#dt-live-dom').DataTable({
  89. "columns": [
  90. null,
  91. { "orderDataType": "dom-text-numeric" },
  92. { "orderDataType": "dom-text", type: 'string' },
  93. { "orderDataType": "dom-select" }
  94. ]
  95. });
  96. });
  97. // Server side processing Data-table
  98. $('#dt-server-processing').DataTable({
  99. "processing": true,
  100. "serverSide": true,
  101. "ajax": "dt-json-data/scripts/server-processing.php",
  102. "columns": [
  103. { "data": "first_name" },
  104. { "data": "last_name" },
  105. { "data": "position" },
  106. { "data": "office" },
  107. { "data": "start_date" },
  108. { "data": "salary" }
  109. ]
  110. });
  111. $('#dt-http').DataTable({
  112. "processing": true,
  113. "serverSide": true,
  114. "ajax": {
  115. url: "dt-json-data/scripts/server-processing.php",
  116. data: function(d) {
  117. d.myKey = "myValue";
  118. // d.custom = $('#myInput').val();
  119. // etc
  120. }
  121. },
  122. "columns": [
  123. { "data": "first_name" },
  124. { "data": "last_name" },
  125. { "data": "position" },
  126. { "data": "office" },
  127. { "data": "start_date" },
  128. { "data": "salary" }
  129. ]
  130. });
  131. $('#dt-post').DataTable({
  132. "processing": true,
  133. "serverSide": true,
  134. "ajax": {
  135. url: "dt-json-data/scripts/post.php",
  136. type: "post"
  137. },
  138. "columns": [
  139. { "data": "first_name" },
  140. { "data": "last_name" },
  141. { "data": "position" },
  142. { "data": "office" },
  143. { "data": "start_date" },
  144. { "data": "salary" }
  145. ]
  146. });
  147. // Data-table ajax
  148. $('#dt-ajax-array').DataTable({
  149. "ajax": "dt-json-data/arrays.txt"
  150. });
  151. $('#dt-ajax-object').DataTable({
  152. "ajax": "dt-json-data/objects.txt",
  153. "columns": [
  154. { "data": "name" },
  155. { "data": "position" },
  156. { "data": "office" },
  157. { "data": "extn" },
  158. { "data": "start_date" },
  159. { "data": "salary" }
  160. ]
  161. });
  162. $('#dt-nested-object').DataTable({
  163. "processing": true,
  164. "ajax": "dt-json-data/objects_deep.txt",
  165. "columns": [
  166. { "data": "name" },
  167. { "data": "hr.position" },
  168. { "data": "contact.0" },
  169. { "data": "contact.1" },
  170. { "data": "hr.start_date" },
  171. { "data": "hr.salary" }
  172. ]
  173. });
  174. $('#dt-orthogonal').DataTable({
  175. ajax: "dt-json-data/orthogonal.txt",
  176. columns: [
  177. { data: "name" },
  178. { data: "position" },
  179. { data: "office" },
  180. { data: "extn" }, {
  181. data: {
  182. _: "start_date.display",
  183. sort: "start_date.timestamp"
  184. }
  185. },
  186. { data: "salary" }
  187. ]
  188. });
  189. var generatetable = $('#dt-generate-content').DataTable({
  190. "ajax": "dt-json-data/arrays.txt",
  191. "columnDefs": [{
  192. "targets": -1,
  193. "data": null,
  194. "defaultContent": "<button>Click!</button>"
  195. }]
  196. });
  197. $('#dt-generate-content tbody').on('click', 'button', function() {
  198. var data = generatetable.row($(this).parents('tr')).data();
  199. alert(data[0] + "'s salary is: " + data[5]);
  200. });
  201. $('#dt-render').DataTable({
  202. "ajax": "dt-json-data/arrays.txt",
  203. "deferRender": true
  204. });
  205. // Data source table js start
  206. $('#dom-table').DataTable();
  207. $('#ajax-table').DataTable({
  208. "ajax": 'dt-json-data/ajax-table.json'
  209. });
  210. // Jsource table start
  211. var dataSet = [
  212. ["Tiger Nixon", "System Architect", "Edinburgh", "5421", "2011/04/25", "$320,800"],
  213. ["Garrett Winters", "Accountant", "Tokyo", "8422", "2011/07/25", "$170,750"],
  214. ["Ashton Cox", "Junior Technical Author", "San Francisco", "1562", "2009/01/12", "$86,000"],
  215. ["Cedric Kelly", "Senior Javascript Developer", "Edinburgh", "6224", "2012/03/29", "$433,060"],
  216. ["Airi Satou", "Accountant", "Tokyo", "5407", "2008/11/28", "$162,700"],
  217. ["Brielle Williamson", "Integration Specialist", "New York", "4804", "2012/12/02", "$372,000"],
  218. ["Herrod Chandler", "Sales Assistant", "San Francisco", "9608", "2012/08/06", "$137,500"],
  219. ["Rhona Davidson", "Integration Specialist", "Tokyo", "6200", "2010/10/14", "$327,900"],
  220. ["Colleen Hurst", "Javascript Developer", "San Francisco", "2360", "2009/09/15", "$205,500"],
  221. ["Sonya Frost", "Software Engineer", "Edinburgh", "1667", "2008/12/13", "$103,600"],
  222. ["Jena Gaines", "Office Manager", "London", "3814", "2008/12/19", "$90,560"],
  223. ["Quinn Flynn", "Support Lead", "Edinburgh", "9497", "2013/03/03", "$342,000"],
  224. ["Charde Marshall", "Regional Director", "San Francisco", "6741", "2008/10/16", "$470,600"],
  225. ["Haley Kennedy", "Senior Marketing Designer", "London", "3597", "2012/12/18", "$313,500"],
  226. ["Tatyana Fitzpatrick", "Regional Director", "London", "1965", "2010/03/17", "$385,750"],
  227. ["Michael Silva", "Marketing Designer", "London", "1581", "2012/11/27", "$198,500"],
  228. ["Paul Byrd", "Chief Financial Officer (CFO)", "New York", "3059", "2010/06/09", "$725,000"],
  229. ["Gloria Little", "Systems Administrator", "New York", "1721", "2009/04/10", "$237,500"],
  230. ["Bradley Greer", "Software Engineer", "London", "2558", "2012/10/13", "$132,000"],
  231. ["Dai Rios", "Personnel Lead", "Edinburgh", "2290", "2012/09/26", "$217,500"],
  232. ["Jenette Caldwell", "Development Lead", "New York", "1937", "2011/09/03", "$345,000"],
  233. ["Yuri Berry", "Chief Marketing Officer (CMO)", "New York", "6154", "2009/06/25", "$675,000"],
  234. ["Caesar Vance", "Pre-Sales Support", "New York", "8330", "2011/12/12", "$106,450"],
  235. ["Doris Wilder", "Sales Assistant", "Sidney", "3023", "2010/09/20", "$85,600"],
  236. ["Angelica Ramos", "Chief Executive Officer (CEO)", "London", "5797", "2009/10/09", "$1,200,000"],
  237. ["Gavin Joyce", "Developer", "Edinburgh", "8822", "2010/12/22", "$92,575"],
  238. ["Jennifer Chang", "Regional Director", "Singapore", "9239", "2010/11/14", "$357,650"],
  239. ["Brenden Wagner", "Software Engineer", "San Francisco", "1314", "2011/06/07", "$206,850"],
  240. ["Fiona Green", "Chief Operating Officer (COO)", "San Francisco", "2947", "2010/03/11", "$850,000"],
  241. ["Shou Itou", "Regional Marketing", "Tokyo", "8899", "2011/08/14", "$163,000"],
  242. ["Michelle House", "Integration Specialist", "Sidney", "2769", "2011/06/02", "$95,400"],
  243. ["Suki Burks", "Developer", "London", "6832", "2009/10/22", "$114,500"],
  244. ["Prescott Bartlett", "Technical Author", "London", "3606", "2011/05/07", "$145,000"],
  245. ["Gavin Cortez", "Team Leader", "San Francisco", "2860", "2008/10/26", "$235,500"],
  246. ["Martena Mccray", "Post-Sales support", "Edinburgh", "8240", "2011/03/09", "$324,050"],
  247. ["Unity Butler", "Marketing Designer", "San Francisco", "5384", "2009/12/09", "$85,675"]
  248. ];
  249. $('#jsource-table').DataTable({
  250. data: dataSet,
  251. columns: [
  252. { title: "Name" },
  253. { title: "Position" },
  254. { title: "Office" },
  255. { title: "Extn." },
  256. { title: "Start date" },
  257. { title: "Salary" }
  258. ]
  259. });
  260. // Jsource table end
  261. // Server side script table start
  262. $('#server-table').DataTable({
  263. "processing": true,
  264. "serverSide": true,
  265. "ajax": "dt-json-data/server-table.php"
  266. });
  267. // Server side script table end
  268. // Data source table js end
  269. // Api table js start
  270. var t = $('#add-row-table').DataTable();
  271. var counter = 1;
  272. $('#addRow').on('click', function() {
  273. t.row.add([
  274. counter + '.1',
  275. counter + '.2',
  276. counter + '.3',
  277. counter + '.4',
  278. counter + '.5'
  279. ]).draw(false);
  280. counter++;
  281. });
  282. // Automatically add a first row of data
  283. $('#addRow').click();
  284. // Setup - add a text input to each footer cell
  285. $('#footer-search tfoot th').each(function() {
  286. var title = $(this).text();
  287. $(this).html('<input type="text" class="form-control" placeholder="Search ' + title + '" />');
  288. });
  289. // DataTable
  290. var table = $('#footer-search').DataTable();
  291. // Apply the search
  292. table.columns().every(function() {
  293. var that = this;
  294. $('input', this.footer()).on('keyup change', function() {
  295. if (that.search() !== this.value) {
  296. that
  297. .search(this.value)
  298. .draw();
  299. }
  300. });
  301. });
  302. $('#footer-select').DataTable({
  303. initComplete: function() {
  304. this.api().columns().every(function() {
  305. var column = this;
  306. var select = $('<select class="form-control form-control-sm"><option value=""></option></select>')
  307. .appendTo($(column.footer()).empty())
  308. .on('change', function() {
  309. var val = $.fn.dataTable.util.escapeRegex(
  310. $(this).val()
  311. );
  312. column
  313. .search(val ? '^' + val + '$' : '', true, false)
  314. .draw();
  315. });
  316. column.data().unique().sort().each(function(d, j) {
  317. select.append('<option value="' + d + '">' + d + '</option>')
  318. });
  319. });
  320. }
  321. });
  322. // Add Rows start
  323. var srow = $('#row-select').DataTable();
  324. $('#row-select tbody').on('click', 'tr', function() {
  325. $(this).toggleClass('selected');
  326. });
  327. // $('#row-select-btn').on('click',function() {
  328. // alert(srow.rows('.selected').data().length + ' row(s) selected');
  329. // });
  330. // Add Rows end
  331. // Delete rows start
  332. var drow = $('#row-delete').DataTable();
  333. $('#row-delete tbody').on('click', 'tr', function() {
  334. if ($(this).hasClass('selected')) {
  335. $(this).removeClass('selected');
  336. } else {
  337. drow.$('tr.selected').removeClass('selected');
  338. $(this).addClass('selected');
  339. }
  340. });
  341. $('#row-delete-btn').on('click',function() {
  342. drow.row('.selected').remove().draw(!1);
  343. });
  344. // Delete rows end
  345. // /* Formatting function for row details - modify as you need */
  346. function format(d) {
  347. // `d` is the original data object for the row
  348. return '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">' +
  349. '<tr>' +
  350. '<td>Full name:</td>' +
  351. '<td>' + d.name + '</td>' +
  352. '</tr>' +
  353. '<tr>' +
  354. '<td>Extension number:</td>' +
  355. '<td>' + d.extn + '</td>' +
  356. '</tr>' +
  357. '<tr>' +
  358. '<td>Extra info:</td>' +
  359. '<td>And any further details here (images etc)...</td>' +
  360. '</tr>' +
  361. '</table>';
  362. }
  363. var ct = $('#child-table').DataTable({
  364. "ajax": "dt-json-data/ajax-child-rows.json",
  365. "columns": [{
  366. "className": 'details-control',
  367. "orderable": false,
  368. "data": null,
  369. "defaultContent": ''
  370. },
  371. { "data": "name" },
  372. { "data": "position" },
  373. { "data": "office" },
  374. { "data": "salary" }
  375. ],
  376. "order": [
  377. [1, 'asc']
  378. ]
  379. });
  380. // Add event listener for opening and closing details
  381. $('#child-table tbody').on('click', 'td.details-control', function() {
  382. var tr = $(this).closest('tr');
  383. var row = ct.row(tr);
  384. if (row.child.isShown()) {
  385. // This row is already open - close it
  386. row.child.hide();
  387. tr.removeClass('shown');
  388. } else {
  389. // Open this row
  390. row.child(format(row.data())).show();
  391. tr.addClass('shown');
  392. }
  393. });
  394. // Form input start
  395. var table = $('#form-input-table').DataTable();
  396. $('#form-input-btn').on('click',function() {
  397. var data = table.$('input, select').serialize();
  398. alert(
  399. "The following data would have been submitted to the server: \n\n" +
  400. data.substr(0, 120) + '...'
  401. );
  402. return false;
  403. });
  404. // Form input end
  405. // Show-hide table js start
  406. var sh = $('#show-hide-table').DataTable({
  407. "scrollY": "200px",
  408. "paging": false
  409. });
  410. $('a.toggle-vis').on('click', function(e) {
  411. e.preventDefault();
  412. // Get the column API object
  413. var column = sh.column($(this).attr('data-column'));
  414. // Toggle the visibility
  415. column.visible(!column.visible());
  416. });
  417. // Show-hide table js end
  418. // Search API start
  419. function filterGlobal() {
  420. $('#search-api').DataTable().search(
  421. $('#global_filter').val(),
  422. $('#global_regex').prop('checked'),
  423. $('#global_smart').prop('checked')
  424. ).draw();
  425. }
  426. function filterColumn(i) {
  427. $('#search-api').DataTable().column(i).search(
  428. $('#col' + i + '_filter').val(),
  429. $('#col' + i + '_regex').prop('checked'),
  430. $('#col' + i + '_smart').prop('checked')
  431. ).draw();
  432. }
  433. $('#search-api').DataTable();
  434. $('input.global_filter').on('keyup click', function() {
  435. filterGlobal();
  436. });
  437. $('input.column_filter').on('keyup click', function() {
  438. filterColumn($(this).parents('tr').attr('data-column'));
  439. });
  440. // Search API end
  441. // Api table js end
  442. // Styling js start
  443. $('#base-style').DataTable();
  444. $('#no-style').DataTable();
  445. $('#compact').DataTable();
  446. $('#table-style-hover').DataTable();
  447. // Styling js end
  448. setTimeout(function(){
  449. $('#simpletable').DataTable();
  450. },350);
  451. $('#order-table').DataTable({
  452. "order": [
  453. [3, "desc"]
  454. ]
  455. });
  456. $('#multi-colum-dt').DataTable({
  457. columnDefs: [{
  458. targets: [0],
  459. orderData: [0, 1]
  460. }, {
  461. targets: [1],
  462. orderData: [1, 0]
  463. }, {
  464. targets: [4],
  465. orderData: [4, 0]
  466. }]
  467. });
  468. $('#complex-dt').DataTable();
  469. $('#DOM-dt').DataTable({
  470. "dom": '<"top"i>rt<"bottom"flp><"clear">'
  471. });
  472. $('#alt-pg-dt').DataTable({
  473. "pagingType": "full_numbers"
  474. });
  475. $('#scr-vrt-dt').DataTable({
  476. "scrollY": "200px",
  477. "scrollCollapse": true,
  478. "paging": false
  479. });
  480. $('#scr-vtr-dynamic').DataTable({
  481. scrollY: '50vh',
  482. scrollCollapse: true,
  483. paging: false
  484. });
  485. $('#lang-dt').DataTable({
  486. "language": {
  487. "decimal": ",",
  488. "thousands": "."
  489. }
  490. });
  491. var table = $('#dom-jqry').DataTable();
  492. $('#dom-jqry tbody').on('click', 'tr', function() {
  493. var data = table.row(this).data();
  494. alert('You clicked on ' + data[0] + '\'s row');
  495. });
  496. $('#colum-rendr').DataTable({
  497. "columnDefs": [{
  498. // The `data` parameter refers to the data for the cell (defined by the
  499. // `data` option, which defaults to the column being worked with, in
  500. // this case `data: 0`.
  501. "render": function(data, type, row) {
  502. return data + ' (' + row[3] + ')';
  503. },
  504. "targets": 0
  505. },
  506. { "visible": false, "targets": [3] }
  507. ]
  508. });
  509. $('#multi-table').DataTable({
  510. "dom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>'
  511. });
  512. $('#complex-header').DataTable({
  513. "columnDefs": [{
  514. "visible": false,
  515. "targets": -1
  516. }]
  517. });
  518. $('#lang-file').DataTable({
  519. "language": {
  520. "url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/German.json"
  521. }
  522. });
  523. $.extend(true, $.fn.dataTable.defaults, {
  524. "searching": false,
  525. "ordering": false
  526. });
  527. $('#setting-default').DataTable();
  528. var table = $('#row-grouping').DataTable({
  529. "columnDefs": [
  530. { "visible": false, "targets": 2 }
  531. ],
  532. "order": [
  533. [2, 'asc']
  534. ],
  535. "displayLength": 25,
  536. "drawCallback": function(settings) {
  537. var api = this.api();
  538. var rows = api.rows({ page: 'current' }).nodes();
  539. var last = null;
  540. api.column(2, { page: 'current' }).data().each(function(group, i) {
  541. if (last !== group) {
  542. $(rows).eq(i).before(
  543. '<tr class="group"><td colspan="5">' + group + '</td></tr>'
  544. );
  545. last = group;
  546. }
  547. });
  548. }
  549. });
  550. // Order by the grouping
  551. $('#row-grouping tbody').on('click', 'tr.group', function() {
  552. var currentOrder = table.order()[0];
  553. if (currentOrder[0] === 2 && currentOrder[1] === 'asc') {
  554. table.order([2, 'desc']).draw();
  555. } else {
  556. table.order([2, 'asc']).draw();
  557. }
  558. });
  559. $('#footer-callback').DataTable({
  560. "footerCallback": function(row, data, start, end, display) {
  561. var api = this.api(),
  562. data;
  563. // Remove the formatting to get integer data for summation
  564. var intVal = function(i) {
  565. return typeof i === 'string' ?
  566. i.replace(/[\$,]/g, '') * 1 :
  567. typeof i === 'number' ?
  568. i : 0;
  569. };
  570. // Total over all pages
  571. total = api
  572. .column(4)
  573. .data()
  574. .reduce(function(a, b) {
  575. return intVal(a) + intVal(b);
  576. }, 0);
  577. // Total over this page
  578. pageTotal = api
  579. .column(4, { page: 'current' })
  580. .data()
  581. .reduce(function(a, b) {
  582. return intVal(a) + intVal(b);
  583. }, 0);
  584. // Update footer
  585. $(api.column(4).footer()).html(
  586. '$' + pageTotal + ' ( $' + total + ' total)'
  587. );
  588. }
  589. });
  590. $('#custm-tool-ele').DataTable({
  591. "dom": '<"toolbar">frtip'
  592. });
  593. $("div.toolbar").html('<b>Custom tool bar! Text/images etc.</b>');
  594. $('#row-callback').DataTable({
  595. "createdRow": function(row, data, index) {
  596. if (data[5].replace(/[\$,]/g, '') * 1 > 150000) {
  597. $('td', row).eq(5).addClass('highlight');
  598. }
  599. }
  600. });
  601. },350);
  602. });