Filtering on a column

Filtering on a column

smarthomessmarthomes Posts: 14Questions: 5Answers: 0
edited August 2015 in Free community support

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();
}); 

'''

Replies

  • smarthomessmarthomes Posts: 14Questions: 5Answers: 0

    Firebug error I get:
    TypeError: packages_table.columns is not a function

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    var packages_table = $('#packages_table').DataTable({
    

    Capital "D".

  • smarthomessmarthomes Posts: 14Questions: 5Answers: 0

    Thank you for that. I no longer get an error, but I also don't get any filtering.

  • smarthomessmarthomes Posts: 14Questions: 5Answers: 0

    I had two id with the same name. This is working now. Thank you.

This discussion has been closed.