在对表列进行排序时使用Semantic UI:的星级评定?

问题描述 投票:2回答:1

我想知道,是否有办法使用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。

javascript html semantic-ui
1个回答
0
投票

您可以在 "td "中添加一个隐藏的跨度,其值与星级数相对应。

<td> <span style="visibility:hidden">3</span>
     <div class="ui star rating" data-rating="3"></div>
</td>
© www.soinside.com 2019 - 2024. All rights reserved.