Skip to content

Instantly share code, notes, and snippets.

@WoodProgrammer
Created August 17, 2017 21:04
Show Gist options
  • Select an option

  • Save WoodProgrammer/5cffed2a73c1309de795da0bf064274c to your computer and use it in GitHub Desktop.

Select an option

Save WoodProgrammer/5cffed2a73c1309de795da0bf064274c to your computer and use it in GitHub Desktop.
<script src="http://code.jquery.com/jquery-latest.min.js"
type="text/javascript"></script>
<link href="https://cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css" rel="stylesheet"/>
<script src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
<table class="table table-striped table-bordered datatable" id="p_history">
<thead>
<tr>
<th>Mail Address</th>
<th>AdamlikPoint</th>
</tr>
</thead>
<tbody>
<tr>
<td>utkucanbykl@gmail.com</td>
<td>0</td>
</tr>
<tr>
<td>corumluutq@gmail.com</td>
<td>Eksi1 </td>
</tr>
<tr>
<td>corumsuzutku@gmail.com</td>
<td>Eksi2</td>
</tr>
<tr>
<td>yorumsuzutq@gmail.com</td>
<td>Sıfır</td>
</tr>
</tbody>
</table>
<script>
$(document).ready(function() {
$('#table_first').dataTable( {
'bSort': true,
'aoColumns': [
{ sWidth: "15%", bSearchable: true, bSortable: true },
{ sWidth: "15%", bSearchable: true, bSortable: true },
{ sWidth: "15%", bSearchable: true, bSortable: true },
{ sWidth: "15%", bSearchable: true, bSortable: true },
{ sWidth: "15%", bSearchable: true, bSortable: true },
{ sWidth: "15%", bSearchable: true, bSortable: true },
],
"scrollY": "200px",
"scrollCollapse": false,
"info": true,
"paging": true
});
$('#p_history').dataTable( {
'bSort': true,
'aoColumns': [
{ sWidth: "45%", bSearchable: true, bSortable: true },
{ sWidth: "45%", bSearchable: true, bSortable: true }
],
"scrollY": "200px",
"scrollCollapse": false,
"info": true,
"paging": true
} );
} );
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment