$(document).ready(function() { $('#table_first').dataTable( { 'bSort': false, 'aoColumns': [ { sWidth: "15%", bSearchable: false, bSortable: false }, { sWidth: "15%", bSearchable: false, bSortable: false }, { sWidth: "15%", bSearchable: false, bSortable: false }, { sWidth: "15%", bSearchable: false, bSortable: false }, { sWidth: "15%", bSearchable: false, bSortable: false }, { sWidth: "15%", bSearchable: false, bSortable: false }, ], "scrollY": "200px", "scrollCollapse": false, "info": true, "paging": true }); $('#p_history').dataTable( { 'bSort': false, 'aoColumns': [ { sWidth: "45%", bSearchable: false, bSortable: false }, { sWidth: "45%", bSearchable: false, bSortable: false }, { sWidth: "10%", bSearchable: false, bSortable: false } ], "scrollY": "200px", "scrollCollapse": false, "info": true, "paging": true } ); } );
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script> <link href="//cdn.datatables.net/1.10.7/css/jquery.dataTables.css" rel="stylesheet"/> <script src="//cdn.datatables.net/1.10.7/js/jquery.dataTables.js"></script> <table class="table table-striped table-bordered datatable" id="table_first"> <thead> <tr> <th> Issue </th> <th> Product </th> <th> Qty </th> <th class="text-right"> Paid </th> <th class="text-right"> Balance </th> <th class="text-right"> Total </th> </tr> </thead> <tbody> <tr> <td>May 20, 2015</a></td> <td>Normal Sim</td> <td>1000</td> <td><span class="pull-right">Rs18,893.00 </span></td> <td><span class="pull-right">Rs131,107.00 </span></td> <td><span class="pull-right">Rs150,000.00 </span></td> </tr> <tr> <td>voice/7?invoice_type=1">May 20, 2015</a></td> <td>Nokia 3310 </td> <td>10000</td> <td><span class="pull-right">Rs2,520,000.00 </span></td> <td><span class="pull-right">Rs12,480,000.00 </span></td> <td><span class="pull-right">Rs15,000,000.00 </span></td> </tr> <tr> <td>May 20, 2015</a></td> <td>Nokia 3310 </td> <td>1000</td> <td><span class="pull-right">Rs404,000.00 </span></td> <td><span class="pull-right">Rs1,096,000.00 </span></td> <td><span class="pull-right">Rs1,500,000.00 </span></td> </tr> </tbody> </table> <table class="table table-striped table-bordered datatable" id="p_history"> <thead> <tr> <th>Issue</th> <th>Paid</th> <th>Comments</th> </tr> </thead> <tbody> <tr> <td>May 20, 2015, 5:15 pm</td> <td>Rs 15,000.00 </td> <td></td> </tr> <tr> <td>May 20, 2015, 5:15 pm</td> <td>Rs 12.00 </td> <td></td> </tr> <tr> <td>May 20, 2015, 5:15 pm</td> <td>Rs 123.00 </td> <td></td> </tr> <tr> <td>May 20, 2015, 5:15 pm</td> <td>Rs 123.00 </td> <td></td> </tr> </tbody> </table>