javascript - JQuery dataTable remove id and class result row need to search in values -
i using datatable , search below code
$(document).ready(function () { var usertable = $('#result').datatable({ "aasorting": [], "binfo": true, "osearch": {"ssearch": ""}, "bautowidth": false, "blengthchange": false, "bpaginate": false, "scrollx": true, "aocolumns": [ null, null, null, null, null, ] }); $('#user-search').keyup(usertable, function(){ console.log($(this).val()); }); usertable.fnfilter($(this).val()); $(".datatables_filter").hide(); });
but search gives result id , class example if search 28, gives result id=28 or if search "green" gives row class=green. in order remove id, class, commented code etc ?
i didn't understand question, if want exclude table columns global search can { "bsearchable": false }
, example if id
and class
columns first , second ones, should do:
var usertable = $('#result').datatable({ "aasorting": [], "binfo": true, "osearch": {"ssearch": ""}, "bautowidth": false, "blengthchange": false, "bpaginate": false, "scrollx": true, "aocolumns": [ { "bsearchable": false }, { "bsearchable": false }, null, null, null, ] });
Comments
Post a Comment