Search/Filter Table Rows Based On Input - table_search.js

File Size: 2.78 KB
Views Total: 10148
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Search/Filter Table Rows Based On Input - table_search.js

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.

How to use it:

1. Download and include the table_search.js script after the latest jQuery library (slim build is recommended).

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

2. Create an input field to filter your long HTML table.

<input type="text" id="input">

<table id="table" class="table table-bordered table-striped">
      <td>[email protected]</td>
      <td>[email protected]</td>
      <td>[email protected]</td>

3. Enable the input field to filter the HTML table while typing.

// table_search(search,tr,indexSearch='0')
$('#input').keyup(function () {
  table_search($('#input').val(),$('#table tbody tr'),'012');

This awesome jQuery plugin is developed by mahmoud-mhamed. For more Advanced Usages, please check the demo page or visit the official website.