Should I include original datatables css when using Bootstrap theme? -


following https://www.datatables.net/manual/styling/bootstrap-simple.html, doesn't include original datatables css.

if remove script in source: (from comment reads not important?)

<script type="text/javascript">     // demo fit datatables site builder...     $('#example')         .removeclass( 'display' )         .addclass('table table-striped table-bordered'); </script> 

there no styling table, see https://jsfiddle.net/glrf9o8t/

it appears demo cheating... mean datatables style classes become useless if don't include original css file?

however if include orginal css in, paging bar looks weird, see https://jsfiddle.net/r45f6dt6/

if you're using datatables.bootstrap css, need manually apply bootstrap classes table. cannot change classes after datatables has been initialized script above because not applied datatables grid. if must change classes programmatically, init datatables callback on function.

<table id="example" class="table table-striped table-bordered" ... > 

demo

note i've removed base datatables css link.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -