1<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0"> 2 <thead> 3 <tr> 4 <th>Channel</th> 5 <th>Count</th> 6 </tr> 7 </thead> 8</table> 9 10<script type="text/javascript"> 11$(document).ready(function() { 12 var table = $('#data-table').dataTable({ 13 "deferRender": true, 14 "order": [[ 1, "desc" ]], 15 "data": [% results | none %], 16 "columns": [ 17 { 18 "data": 'channel' 19 }, { 20 "data": 'ch_count', 21 "searchable": false, 22 "render": function(data, type, row, meta) { 23 return data.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); 24 } 25 } 26 ], 27[% INCLUDE 'ajax/datatabledefaults.tt' -%] 28 }); 29}); 30</script> 31