Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery-datatables-rails bootstrap styling
    text
    copied!<p>In rails I am using bootstrap and dataTables via the jquery-datatables-rails gem. However, I only seem to get half the bootstrap styling.</p> <pre><code>gem 'jquery-datatables-rails', git: 'git://github.com/rweng/jquery-datatables-rails.git' </code></pre> <p>application.js</p> <pre><code> //= require jquery //= require jquery_ujs //= require jquery.ui.core //= require jquery.ui.datepicker //= require twitter/bootstrap //= require dataTables/jquery.dataTables //= require dataTables/jquery.dataTables.bootstrap //= require dataTables/extras/TableTools //= require chosen-jquery //= require best_in_place //= require cocoon //= require_tree . $.extend( $.fn.dataTableExt.oStdClasses, { "sWrapper": "dataTables_wrapper form-inline" } ); </code></pre> <p>application.css</p> <pre><code> *= require_self *= require jquery.ui.core *= require jquery.ui.datepicker *= require dataTables/jquery.dataTables.bootstrap *= require dataTables/extras/TableTools *= require dataTables/extras/TableTools_JUI *= require chosen *= require_tree . */ </code></pre> <p>specific coffee script</p> <pre><code>jQuery -&gt; $('#customers').dataTable sDom: "&lt;'row'&lt;'span6'l&gt;&lt;'span6'f&gt;r&gt;t&lt;'row'&lt;'span6'i&gt;&lt;'span6'p&gt;&gt;" sPaginationType: "bootstrap" bjQueryUI: true </code></pre> <p>erb</p> <pre><code>&lt;table id="customers" class="display" cellpadding="0" cellspacing="0" border="0" class="table table-bordered table-striped"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;etc. </code></pre> <p>However the styling is the one shown below and not that shown on the dataTable site <a href="http://www.datatables.net/media/blog/bootstrap/" rel="nofollow noreferrer">http://www.datatables.net/media/blog/bootstrap/</a></p> <p>Note the header is wrong and the stripes are purple not grey</p> <p><img src="https://i.stack.imgur.com/Ms9xr.png" alt="enter image description here"></p> <p>Any thoughts on what else I need to do? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload