请参阅this page,然后点击“表格”标签。
我正在尝试添加指示排序的三角形,如此(http://datatables.net/blog/Twitter_Bootstrap_2),但我无法弄明白。实际的排序是有效的,而不是样式。
如何让它发挥作用?
答案 0 :(得分:2)
您的表格标题w / class .tablesorter-header
缺少此CSS(根据您的需要更改图片的网址):
table#national_universities_table thead tr .tablesorter-header {
background-image: url("images/bg.gif");
background-repeat: no-repeat;
background-position: right center;
cursor: pointer;
}
table#national_universities_table thead tr .tablesorter-headerAsc {
background-image: url("images/asc.gif");
}
table#national_universities_table thead tr .tablesorter-headerDesc {
background-image: url("images/desc.gif");
}