JS filtering was hiding the thead

This commit is contained in:
Remy Sharp 2010-03-05 10:14:04 +00:00
parent 4a3679135e
commit 40ef445651
1 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ function spans($list) {
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script> <script>
$('tr span').click(function () { $('tbody tr span').click(function () {
var $tag = $(this), tag = $tag.text(), type = $tag.closest('td').attr('class'); var $tag = $(this), tag = $tag.text(), type = $tag.closest('td').attr('class');
if ($tag.is('.selected')) { if ($tag.is('.selected')) {
$('.' + type + ' span:contains(' + tag + ')').removeClass('selected'); $('.' + type + ' span:contains(' + tag + ')').removeClass('selected');
@ -93,10 +93,10 @@ $('tr span').click(function () {
// it's an AND filter // it's an AND filter
var $trs = $('.' + type + ':has(span.selected)').closest('tr'); var $trs = $('.' + type + ':has(span.selected)').closest('tr');
if ($trs.length) { if ($trs.length) {
$('tr').hide(); $('tbody tr').hide();
$trs.show(); $trs.show();
} else { } else {
$('tr').show(); $('tbody tr').show();
} }
}); });