what are options to replace empty() in .prependTo( $(column.header()).empty())

what are options to replace empty() in .prependTo( $(column.header()).empty())

rprossorrprossor Posts: 2Questions: 2Answers: 0

I have the above in my code as part of the process of adding a filter on my .dataTable.

On loading it shows a blank box with an arrow to select options. Using it in the header replaces the column header. How can I replace the blank text in the box with the column header?

Regards

Richard

Answers

  • n1x0nn1x0n Posts: 4Questions: 1Answers: 0

    I did so only
    add this code after the end of the script

    function nameSelectors(){
            
            var tableFootVar = document.querySelectorAll('#example tfoot th')
            var tableHeadVar = document.querySelectorAll('#example thead th')
            
            for(var i = 0;i<tfootVar.length;i++){
                    tableFootVar[i].firstChild.firstChild.innerHTML= tableHeadVar[i].innerText
                }
        };
        setTimeout(nameSelectors,3500)
    
This discussion has been closed.