Advertisement
gsmashik

filter like excel

Jun 27th, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.68 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>Export</title>
  5.     <meta charset="utf-8">
  6.   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  7.   <link rel="stylesheet" href="https://www.jqueryscript.net/demo/Excel-like-Bootstrap-Table-Sorting-Filtering-Plugin/excel-bootstrap-table-filter-style.css">
  8.   <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  9.  
  10.   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  11.   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  12.     <script src="https://www.jqueryscript.net/demo/Excel-like-Bootstrap-Table-Sorting-Filtering-Plugin/excel-bootstrap-table-filter-bundle.js"></script>
  13.     <script src=""></script>
  14.  
  15. </head>
  16. <body>
  17.     <button class="btn filter btn-info"><i class="fa fa-filter"></i></button>
  18. <div class="container">
  19. <table class="table table-condensed">
  20.     <thead>
  21.       <tr>
  22.         <th>Firstname</th>
  23.         <th>Lastname</th>
  24.         <th>Email</th>
  25.       </tr>
  26.     </thead>
  27.     <tbody>
  28.       <tr>
  29.         <td>John</td>
  30.         <td>Doe</td>
  31.         <td>john@example.com</td>
  32.       </tr>
  33.       <tr>
  34.         <td>Mary</td>
  35.         <td>Moe</td>
  36.         <td>mary@example.com</td>
  37.       </tr>
  38.       <tr>
  39.         <td>July</td>
  40.         <td>Dooley</td>
  41.         <td>july@example.com</td>
  42.       </tr>
  43.     </tbody>
  44.   </table>
  45.  
  46. </div>    
  47. <script>
  48.     $(document).ready(function($) {
  49.     $(".filter").click(function(event) {
  50.             $(this).removeClass('filter');
  51. $('table').excelTableFilter(function(){
  52.         });
  53.  
  54.     });
  55.  
  56.     });
  57.    
  58. </script>
  59. </body>
  60. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement