Table Filter Bootstrap + Jquery
HTML
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<div class="input-group"> <span class="input-group-addon">Filter For Quantity</span>
<input id="filter" type="text" class="form-control" placeholder="Type here...">
</div>
<table class="table table-striped marg_none tablesorter tablesorter-jui" id="myTable" role="grid">
<colgroup class="tablesorter-colgroup">
<col style="width: 0.9%;">
<col style="width: 14%;">
<col style="width: 14%;">
<col style="width: 14%;">
<col style="width: 14%;">
<col style="width: 8%;">
<col style="width: 8.1%;">
<col style="width: 8.1%;">
<col style="width: 8.1%;">
</colgroup>
<thead>
<tr role="row" class="tablesorter-headerRow">
<th data-sorter="true" width="1%" data-column="0" class="tablesorter-header tablesorter-headerUnSorted" tabindex="0" scope="col" role="columnheader" aria-disabled="false" aria-controls="myTable" unselectable="on" aria-sort="none" aria-label=": No sort applied, activate to apply an ascending sort" style="-webkit-user-select: none;">
<div class="tablesorter-header-inner"></div>
</th>
<th data-sorter="true" width="9.8%" data-column="1" class="tablesorter-header tablesorter-headerUnSorted" tabindex="0" scope="col" role="columnheader" aria-disabled="false" aria-controls="myTable" unselectable="on" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort" style="-webkit-user-select: none;">
<div class="tablesorter-header-inner">Name </div>
</th>
<th width="9.8%" data-column="2" class="tablesorter-header tablesorter-headerDesc" tabindex="0" scope="col" role="columnheader" aria-disabled="false" aria-controls="myTable" unselectable="on" aria-sort="descending" aria-label="Difference: Descending sort applied, activate to...
JavaScript
$(document).ready(function () {
(function ($) {
$('#filter').keyup(function () {
var rex = new RegExp($(this).val(), 'i');
$('.myTable tr').hide();
$('.myTable tr').filter(function () {
return rex.test($(this).text());
}).show();
})
}(jQuery));
});