http://jsfiddle.net/e3nk137y/4537/
<table data-toggle="table"
>
<thead>
<tr>
<th data-field="fruit" data-sortable="true">Item</th>
<th data-field="date" data-sortable="true">Date</th>
<th data-field="type" data-sortable="true">Type</th>
</tr>
</thead>
<tbody>
<tr><td>Pear </td><td data-month="1">January</td> <td>Fruit</td></tr>
<tr><td>Carrot</td><td data-month="3">March</td> <td>Vegetable</td></tr>
<tr><td>Apple </td><td data-month="2">February</td><td>Fruit</td></tr>
</tbody>
</table>
在此 fiddle 中是一个表格的示例。单击标题时,表格将按属于该标题的列进行排序。
我的问题是,是否可以通过其他方式(从其他函数)触发该函数。更一般地说:我可以显式调用从各种 Bootstrap 小部件中作为回调调用的函数吗?
最佳答案
关于javascript - Bootstrap 表 : is it possible to call the function which sorts rows by column from code (without clicking the header),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35164654/