Skip to content

Commit

Permalink
search fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sunhater committed Jan 23, 2014
1 parent 093cbd3 commit 6994225
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions jquery.shCheckset-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions jquery.shCheckset.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* jQuery shCheckset v1.0
* jQuery shCheckset v1.1
* http://jquery.sunhater.com/shCheckset
* 2014-01-22
* 2014-01-24
*
* Copyright (c) 2010-2014 Pavel Tzonkov <sunhater@sunhater.com>
* Dual licensed under the MIT and GPL licenses.
Expand Down Expand Up @@ -156,9 +156,8 @@

$(this).val(search + (lastSpace ? " " : ""));

$(t).find('option').each(function(i) {
$(div).find('label[for="' + c.namespace + '_' + (name.substr(0, name.length - 2) + this.value + '_' + i) + '"]')
.css('display', (search.length && (this.text.toLowerCase().indexOf(search.toLowerCase()) == -1)) ? 'none' : 'block');
$(div).find('label').each(function(i) {
$(this).css('display', (search.length && ($(this).find('span').text().toLowerCase().indexOf(search.toLowerCase()) == -1)) ? 'none' : 'block');
});
});
$(t).detach();
Expand Down

0 comments on commit 6994225

Please sign in to comment.