I had dataTables working with the table in my rails application, but after I installed bootstrap and tried to set up the table with bootstrap, the table won't switch to the new styling. I followed the steps laid out here under "Twitter Bootstrap 3 Installation": https://github.com/rweng/jquery-datatables-rails
Not sure what I'm doing wrong. Here is my code:
Table in view:
<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 .
*/
What am I doing wrong? Thanks for your help.
UPDATE
I added class="table table-bordered table-striped" which helped a bit, but still isn't doing the job.