"Bootstrap styling for Datatable"
Bootstrap 3.3.0 Snippet by mohsinirshad

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<script language="JavaScript" src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
<script language="JavaScript" src="https://cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js" type="text/javascript"></script>
<script language="JavaScript" src="https://cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/3/dataTables.bootstrap.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/3/dataTables.bootstrap.css">
<body>
<div class="container">
<div class="row">
<h2 class="text-center">Bootstrap styling for Datatable</h2>
</div>
<div class="row">
<div class="col-md-12">
<table id="datatable" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<tfoot>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.pagination>li {
display: inline;
padding:0px !important;
margin:0px !important;
border:none !important;
}
.modal-backdrop {
z-index: -1 !important;
}
/*
Fix to show in full screen demo
*/
iframe
{
height:700px !important;
}
.btn {
display: inline-block;
padding: 6px 12px !important;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
$(document).ready(function() {
$('#datatable').dataTable();
$("[data-toggle=tooltip]").tooltip();
} );
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments:

how to modifi the datatable_length ?

di H () - 8 years ago - Reply -3


I get the anwser :)
$(document).ready(function() {
$('#example').DataTable( {
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
} );
} );
CAN WORK!!!!!!!!!!!!!!!!!!

di H () - 8 years ago - Reply 0


when I bind the data from Structured query language design is not working

charulathav () - 10 months ago - Reply 0


when I bind the data from Structured query language design is not working

charulathav () - 10 months ago - Reply 0


when I bind the data from Structured query language design is not working

charulathav () - 10 months ago - Reply 0


when I bind the data from Structured query language design is not working

charulathav () - 10 months ago - Reply 0


when i bind the data from sql design is not working

charulathav () - 10 months ago - Reply 0


modal does not show when edit and delete button was clicked

Louie Cornell Babanto () - 7 years ago - Reply 0


Est-ce possible d'avoir la pagination, le filtre et la recherche please ???

tray () - 8 years ago - Reply 0


Hi, Why no Filter, Search and Pagination?
How to put it?

Oeurn Sokly () - 8 years ago - Reply 0


very nice my friend. thank u

sauron () - 9 years ago - Reply 0


Hhh

Destinykidd () - 4 years ago - Reply 0