我有我的Rails應用程序中的表與數據表一起工作,但在安裝引導程序並嘗試使用引導設置表後,表將不會切換到新的樣式。我按照「Twitter Bootstrap 3安裝」中列出的步驟操作:https://github.com/rweng/jquery-datatables-railsRails dataTable引導樣式不工作
不知道我在做什麼錯。這裏是我的代碼:
表鑑於:
<table id="products">
<thead>
<tr>
<th>Name</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<tr>
<td>Something</td>
<td>Something</td>
</tr>
<tr>
<td>Something</td>
<td>Something</td>
</tr>
<tr>
<td>Something</td>
<td>Something</td>
</tr>
</tbody>
</table>
的application.js
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require dataTables/jquery.dataTables
//= require dataTables/jquery.dataTables.bootstrap3
//= require turbolinks
//= require_tree .
$(document).ready(function()
{
$("#products").dataTable({
sPaginationType: "bootstrap"
});
}
);
Application.css
/*
*= require_self
*= require dataTables/jquery.dataTables.bootstrap3
*= require_tree .
*/
我做錯了什麼?謝謝你的幫助。
UPDATE
我加類=「表表邊框的表格條紋」這幫助了一點,但仍然沒有做的工作。