table sorter images not applying in tablesorter.js?

梦想的初衷 提交于 2019-12-02 04:05:14

Try to wrap your jQuery code inside DOM ready handler:

$(function() {
    $('#requestheader').tablesorter({
       /* theme: 'blue',*/
        sortList: [
            [1, 0]
        ],
        widgets: ['zebra', 'columns']
    });
});

The latest version of tablesorter uses different class names from the original. Try using the following css:

.tablesorter thead tr .header {
    background-image: url('/Public/images/sorter/bg.gif');  
    background-repeat: no-repeat;
    background-position: center right;
    cursor: pointer;
}
.tablesorter thead tr .headerSortAsc {
    background-image: url('/Public/images/sorter/asc.gif'); 
}
.tablesorter thead tr .headerSortDesc {
    background-image: url('/Public/images/sorter/desc.gif'); 
}

If you want to change the actual class name, then modify the cssAsc and cssDesc option.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!