我已经在我的应用程序中集成了footable。我已经包含了footable.js、footable.filter.js、footable.paginate.js、footable.sort.js 和css 文件(footable.core.css 和footable.metro.css)。分页和过滤工作完美,但排序不起作用。
<table class='footable' data-page-navigation=".pagination" data-filter="#filter" data-page-size="10" data-page-previous-text="prev" data-page-next-text="next">
<thead>
<tr>
<th data-sort-initial="true" class='sort-column'>Name</th>
<th class='sort-column'>Description</th>
<th>Actions</th>
<th>Manage</th>
</tr>
</thead>
<tbody>
<% @fee_categories.each do |fee_category| %>
<tr>
<td><%= link_to fee_category.name, fee_category %></td>
<td><%= fee_category.description %></td>
<td>
<%= link_to edit_fee_category_path(fee_category) do %>
<i class='icon-white icon-pencil btn-primary btn'></i>
<% end %>
<%= link_to fee_category, method: :delete, data: { confirm: 'Are you sure?' } do %>
<i class='icon-white icon-remove btn-danger btn'></i>
<% end %>
</td>
<td><%= link_to "Add Particulars", "#" %></td>
</tr>
<% end %>
</tbody>
<tfoot class="hide-if-no-paging">
<tr>
<td colspan="5">
<div class="pagination pagination-centered"></div>
</td>
</tr>
</tfoot>
</table>
js文件是
$('.footable').footable();