🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

table_search.js is an ultra small (< 1kb) jQuery table search plugin which allows the user to quickly filter table rows based on the text (case sensitive) typed in an input field.

table-filter

Documentation

table search

search in table rows

Getting Started

Prerequisites

jQuery library

Installing

<script src='table_search.js'></script> 

Running the tests

<input type="text" id="input" placeholder="enter text to search">     <table id="table" border="2" >         <thead>             <tr>                 <th>id</th>                 <th>name</th>                 <th>age</th>             </tr>         </thead>         <tbody>             <tr>                 <td>1</td>                 <td>mahmoud</td>                 <td>22</td>             </tr>             <tr>                 <td>2</td>                 <td>ahmed</td>                 <td>20</td>             </tr>             <tr>                 <td>3</td>                 <td>mostafa</td>                 <td>15</td>             </tr>             <tr>                 <td>4</td>                 <td>ali</td>                 <td>22</td>             </tr>         </tbody>         <tfoot>             <tr>                 <td>5</td>                 <td>khaled</td>                 <td>25</td>             </tr>             <tr>                 <td>6</td>                 <td>ali</td>                 <td>20</td>             </tr>         </tfoot>     </table>
$('#input').keyup(function () {     select_search('input','select'); });
$('#input').keyup(function () {     table_search($('#input').val(),$('#table tbody tr,#table tfoot tr'),'012'); });

Authors

Find me in facebock who participated in this project.


You May Also Like