Filtering on a column
Filtering on a column
smarthomes
Posts: 14Questions: 5Answers: 0
I have taken this straight from the examples and can't figure out how to get it to work.
'''
$(document).ready(function(){
var packages_table = $('#packages_table').dataTable({
"columns": [{
"orderable": false,
"visible": false,
"searchable": true
}, {
"orderable": true,
"className": "col-600",
"searchable": true
}, {
"orderable": false,
"searchable": false
}, {
"orderable": false,
"className": "col-150",
"searchable": false
}, {
"orderable": true,
"className": "col-40",
"searchable": false
}, {
"orderable": false,
"className": "col-40",
"searchable": false
}],
"order": [0,"asc"],
});
});
$("#button_filter").on('click', function () {
packages_table
.columns(0)
.search('Audio')
.draw();
});
'''
This discussion has been closed.
Replies
Firebug error I get:
TypeError: packages_table.columns is not a function
Capital "D".
Thank you for that. I no longer get an error, but I also don't get any filtering.
I had two id with the same name. This is working now. Thank you.