summaryrefslogtreecommitdiffstats
path: root/multiple-select.js
diff options
context:
space:
mode:
author0x0049 <dev@0x0049.me>2015-12-14 16:40:18 -0700
committer0x0049 <dev@0x0049.me>2015-12-14 16:40:18 -0700
commit2aaa54be256029fa9addc8785fc33912fce689bd (patch)
tree30121ca4ee867d1b37ac29296dc402c279cc46ec /multiple-select.js
parent324afe0d4605d708b740b18bf0aa02e867e64d54 (diff)
downloadmultiple-select-2aaa54be256029fa9addc8785fc33912fce689bd.zip
multiple-select-2aaa54be256029fa9addc8785fc33912fce689bd.tar.gz
multiple-select-2aaa54be256029fa9addc8785fc33912fce689bd.tar.bz2
Add selected class to "select all" option
Previously it would be applied to everything _except_ the "select all" option, making it impossible to style the "select all" option when it was selected.
Diffstat (limited to 'multiple-select.js')
-rw-r--r--multiple-select.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/multiple-select.js b/multiple-select.js
index d811b28..e159009 100644
--- a/multiple-select.js
+++ b/multiple-select.js
@@ -405,7 +405,7 @@
// add selected class to selected li
this.$drop.find('li').removeClass('selected');
- this.$drop.find(sprintf('input[%s]:checked', this.selectItemName)).each(function () {
+ this.$drop.find('input:checked').each(function () {
$(this).parents('li').first().addClass('selected');
});