3
我在這裏看到這個話題,但它並沒有解決我的問題。Tablekit:排序不工作,如果表格行加載ajax
我有一個表格,在html中看起來像這樣;
<table class="sortable resizable editable" id="tablekit-table-1">
<thead>
<tr>
<th id="order_orders" class="sortfirstdesc sortcol sortdesc">Order</th>
</tr>
</thead>
<tfoot>
</tfoot>
<tbody id="orders_content">
<?php //data generated by ajax ?>
</tbody>
</table>
在頁面加載時,行通過ajax加載到tbody中。
問題是,tablekit的排序不能從那裏工作(只有當我輸出php的行)。
我試着在阿賈克斯成功加入setTimeout()
,重新初始化表
TableKit.Sortable.init('tablekit-table-1')
等,沒有任何幫助。谷歌搜索很多。提前致謝。