Search code examples
jquerytablesorter

how to get rid of the "tablesorter-header-inner" div in tablesorter 2


since tablesorter is upgraded to version 2, it starts adding an extra div with class "tablesorter-header-inner" to every tr after sorting. It screws up a lot of stuff in my project.

I am just wondering if there is a way to avoid adding these extra div.

Thanks in advance.


Solution

  • It sounds like you're using my fork of tablesorter. If that is the case, just set the headerTemplate option to an empty string ('') (demo):

    $(function () {
        $('table').tablesorter({
            theme: 'blue',
            headerTemplate: ''
        });
    });
    

    The reason it was added was because in older versions of Firefox, the table cell could not have a position definition applied to it. That has since been resolved (I'm pretty sure), so the "tablesorter-header-inner" isn't necessary any more.