我想知道,是否有办法使用Semantic UI:s star rating-component对表格列进行排序?我正在使用Javascript(jQuery tablesort插件)对所有列进行排序。排序工作适用于所有含有字符串类型数据的列。以下是星级评定表数据单元格内的html代码。
<td><div class="ui star rating" data-rating="3"></div></td>
这是我的表格。http:/kajlax.mbnet.fi)。
Semantic UI:s rating-component。https:/semantic-ui.commodulesrating.html。
您可以在 "td "中添加一个隐藏的跨度,其值与星级数相对应。
<td> <span style="visibility:hidden">3</span>
<div class="ui star rating" data-rating="3"></div>
</td>