表分类器图像不适用于tablesorter.js? [英] table sorter images not applying in tablesorter.js?
问题描述
我正在尝试将分类器图像应用到表格分类器表,如下所示。但样式不适用。
使用以下js文件
I am trying to apply the sorter images to table sorter table like the below.But the styles are not applying. using the below js file
https://github.com/Mottie/tablesorter
默认主题正在应用,所以我的表设计正在改变。
我不想要图像的表格排序器主题我会应用自定义css。
请检查以下代码分拣机图像不适用于我的表格分拣机。
By default themes are applying so my table design is changing . i don't want the table sorter themes for images i will apply customize css. please check below code sorter images are not applying to my table sorter.
<style type="text/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 .headerSortUp {
background-image: url('/Public/images/sorter/asc.gif');
}
.tablesorter thead tr .headerSortDown {
background-image: url('/Public/images/sorter/desc.gif');
}
</style>
<script type="text/javascript">
$('#requestheader').tablesorter({
/* theme: 'blue',*/
sortList: [
[1, 0]
],
widgets: ['zebra', 'columns']
});
</script>
<table class="tablesorter" id="requestheader">
<thead>
<th></th>
<th></th>
</thead>
<tbody>
</tbody>
</table>
请告诉我如何将分类器图片应用到表格中?让我知道如何应用CSS table?
Please tell me how to apply sorter images to table ?let me know the how to apply css to my table?
推荐答案
最新版本的tablesorter使用不同的类名称。尝试使用以下css:
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');
}
如果要更改实际的类名,请修改 cssAsc
和 cssDesc
选项。
If you want to change the actual class name, then modify the cssAsc
and cssDesc
option.
这篇关于表分类器图像不适用于tablesorter.js?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!