author | Dan Fuhry <dan@enanocms.org> |
Sat, 23 Feb 2013 14:26:05 -0500 | |
changeset 8 | f68fdcc18df9 |
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 |
}); |