Guest User

Untitled

a guest
Nov 14th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. <div class="tab-inn">
  2. <div class="table-responsive table-desi">
  3. <table class="table table-hover">
  4. <thead>
  5. <tr>
  6. <th>ID</th>
  7. <th>Part Number</th>
  8. <th>Bid</th>
  9. <th>Model</th>
  10. </tr>
  11. </thead>
  12. <tbody>
  13.  
  14. <?php while ($row = mysql_fetch_array($r_query)){ ?>
  15. <tr>
  16. <td><?php echo $row['id']; ?></td>
  17. <td><?php echo $row['partnumber']; ?></td>
  18. <td><?php echo $row['bid']; ?></td>
  19. <td><?php echo $row['model']; ?></td>
  20. </tr>
  21. <?php } ?>
  22. </table>
  23. </div>
  24. </div>
  25. <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
  26. <script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
  27. <link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css" />
  28. <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css" />
  29.  
  30. <script>
  31. $(document).ready(function (){
  32. var table = $('table').DataTable({
  33. dom: 'Bfrtip',
  34. buttons: ['copy', 'csv', 'excel', 'pdf', 'print','pageLength']
  35. });
  36.  
  37. $('#mySearch').on('keyup redraw', function() {
  38. var searchString = '(' + $('#mySearch').val().split(' ').join('|') + ')';
  39.  
  40. table.search(searchString, true).draw(true);
  41. });
  42.  
  43. </script>
Add Comment
Please, Sign In to add comment