1jQuery(document).ready(function ($) { 2 $.noConflict(true); 3 $('#nccdatatable').DataTable({ 4 initComplete: function () { 5 this.api() 6 .columns() 7 .every(function () { 8 var column = this; 9 10 var columntitle = $(column.header()).html(); 11 if(columntitle == "Category"){ 12 var select = $('<select><option value=""></option></select>') 13 .appendTo($("#cat-filter")) 14 .on('change', function () { 15 var val = $.fn.dataTable.util.escapeRegex($(this).val()); 16 //console.log('changed'); 17 column.search(val ? '^' + val + '$' : '', true, false).draw(); 18 }); 19 20 column 21 .data() 22 .unique() 23 .sort() 24 .each(function (d, j) { 25 select.append('<option value="' + d + '">' + d + '</option>'); 26 //console.log('<option value="' + d + '">' + d + '</option>'); 27 }); 28 } 29 if(columntitle == "Salary"){ 30 var select = $('<select><option value=""></option></select>') 31 .appendTo($("#salary-filter")) 32 .on('change', function () { 33 var val = $.fn.dataTable.util.escapeRegex($(this).val()); 34 //console.log('changed'); 35 column.search(val ? '^' + val + '$' : '', true, false).draw(); 36 }); 37 38 column 39 .data() 40 .unique() 41 .sort() 42 .each(function (d, j) { 43 select.append('<option value="' + d + '">' + d + '</option>'); 44 //console.log('<option value="' + d + '">' + d + '</option>'); 45 }); 46 } 47 }); 48 }, 49 /*initComplete: function () { 50 this.api() 51 .columns() 52 .every(function () { 53 var column = this; 54 var select = $('<select><option value=""></option></select>') 55 .appendTo($(column.header()).empty()) 56 .on('change', function () { 57 var val = $.fn.dataTable.util.escapeRegex($(this).val()); 58 //console.log('changed'); 59 column.search(val ? '^' + val + '$' : '', true, false).draw(); 60 }); 61 62 column 63 .data() 64 .unique() 65 .sort() 66 .each(function (d, j) { 67 select.append('<option value="' + d + '">' + d + '</option>'); 68 //console.log('<option value="' + d + '">' + d + '</option>'); 69 }); 70 }); 71 },*/ 72 autowidth: true, 73 paging: false, 74 }); 75});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.