author | Dan Fuhry <dan@fuhry.us> |
Fri, 11 Jan 2013 05:41:41 -0500 | |
changeset 4 | 2212b2ded8bf |
parent 0 | 3906ca745819 |
permissions | -rw-r--r-- |
0 | 1 |
$(function() |
2 |
{ |
|
3 |
$('.grep-filter').bind('keyup', function() |
|
4 |
{ |
|
5 |
var searchkey = $(this).val(); |
|
6 |
||
7 |
if ( $(this).val() == '' ) |
|
8 |
{ |
|
9 |
$('.grep-me tr').show(); |
|
10 |
return; |
|
11 |
} |
|
12 |
||
13 |
$('.grep-me tr').each(function(i, e) |
|
14 |
{ |
|
15 |
if ( $('.grep-col', e).text().toLowerCase().indexOf(searchkey.toLowerCase()) > -1 ) |
|
16 |
$(e).show(); |
|
17 |
else |
|
18 |
$(e).hide(); |
|
19 |
}); |
|
20 |
}); |
|
21 |
}); |