the code are not worked at my table

the code are not worked at my table

BhardwajBhardwaj Posts: 1Questions: 1Answers: 0
edited December 2018 in Free community support
// DataTable
var table = $('#finder').dataTable({
    processing: true,
    serverSide: true,
 
    ajax: {
        url: "../jecom_api/xhr_finder_datatables",
        type: "POST"
        }
    }
});
 
// Apply the search
table.columns().eq( 0 ).each( function ( colIdx ) {
    $( 'input', table.column( colIdx ).footer() ).on('keyup change', function () {
        table
            .column( colIdx )
            .search( this.value )
            .draw();
    } );

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @Bhardwaj ,

    You haven't said why it isn't working, but I suspect you're getting errors because line 2 should be (note the case):

    var table = $('#finder').DataTable({
    

    If that doesn't work, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.