when i type any words , filtering not working, Please help for my thesis.

when i type any words , filtering not working, Please help for my thesis.

dnepomuceno101dnepomuceno101 Posts: 31Questions: 4Answers: 0
edited October 2021 in Free community support

when i type any words , filtering not working,

Please help for my thesis.

$(document).ready(function() {
    $('a[data-toggle="tab"]').on( 'shown.bs.tab', function (e) {
        $.fn.dataTable.tables( {visible: true, api: true} ).columns.adjust();
    } );
     
    var table1 = $('table.tableresponsive').DataTable( {
        responsive:true,
        language: {
            searchPlaceholder: "Type here . . ." }
    } );

    $('#DSE tfoot th').each( function () {
        var title = $(this).text();
        $(this).html( '<input type="text" placeholder="Filter '+title+'" />' );
    } );
    var table = $('#DSE').table1({
        orderCellsTop: true,
        fixedHeader: true,
        initComplete: function () {
            this.api().columns().every( function () {
                var that = this;
                $( 'input', this.footer() ).on( 'keyup change clear', function () {
                    if ( that.search() !== this.value ) {
                        that
                            .search( this.value )
                            .draw();
                    }
                });
            });
        },
    });

Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

This question has an accepted answers - jump to answer

Answers

  • dnepomuceno101dnepomuceno101 Posts: 31Questions: 4Answers: 0

    can you highlight my mistakes kind sir?

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736
    Answer ✓

    var table = $('#DSE').table1({

    This doesn't look right. What is table1? I think you should have var table = $('#DSE').DataTable({ instead. I suspect you are getting an error in the browser's console about table1.

    If this doesn't help please provide a link to your page or a test case replicating the issue so we can help debug.
    https://datatables.net/manual/tech-notes/10

    Kevin

  • dnepomuceno101dnepomuceno101 Posts: 31Questions: 4Answers: 0

    ok sir, but how can i call Datatable for different tables?

  • dnepomuceno101dnepomuceno101 Posts: 31Questions: 4Answers: 0

    its ok now sir thank you

Sign In or Register to comment.