author | Dan Fuhry <dan@fuhry.us> |
Sat, 16 Feb 2013 20:47:45 -0500 | |
changeset 7 | faf6f7941e8f |
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 |
}); |