datatable header popover

datatable header popover

SeungwooSeungwoo Posts: 2Questions: 2Answers: 0
edited April 2017 in Free community support

I want to "filter icon click event" in datatable's header.
help me !

    $('table').DataTable({
        scrollX: "100%",
        scrollY: 400,
        scrollCollapse: true,
        paging: false,
        searching: false,
        info : false,
        initComplete : function(settings,json){
            this.api().columns().every(function(){

                var self = this;
                var index = $(self.index())[0];

                if (index > 0 ){
                    var filter = $('<a><i class="margin-left-6 fa fa-filter"></i></a>');
                    var options = {
                        title : "Search",
                        content : 'Content test',
                        placement : 'top',
                        trigger : 'click',
                        animation : 'true'
                    }

                    filter.popover(options).appendTo(self.header());
                }
            });
        }
    });
This discussion has been closed.