# Bootstrap3 plugin for datatable

This plugin adds tweaks for datatable UI to render correctly.

Files & Code
<link rel="stylesheet" href="css/datatables.css">
<script src="js/datatables.js"></script>
// Html code
<table class="datatable table table-striped table-bordered">
</table>
// Javascript code
$('.datatable').dataTable();
$('.datatable').each(function(){
var datatable = $(this);
var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
search_input.attr('placeholder', 'Search');
search_input.addClass('form-control input-sm');
var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
length_sel.addClass('form-control input-sm');
});
Pagination types
`$('.datatable').dataTable({
"sPaginationType": "bs_normal"
});`

View Default »

`$('.datatable').dataTable({
"sPaginationType": "bs_two_button"
});`

View Two buttons »

`$('.datatable').dataTable({
"sPaginationType": "bs_four_button"
});`

View Four buttons »

`$('.datatable').dataTable({
"sPaginationType": "bs_full"
});`

View Complete »