Skip to content

Commit 1192e42

Browse files
committed
handle checkall/uncheckall visibility when select mode is changed, fixes #638
1 parent df22c4c commit 1192e42

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/jquery.multiselect.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,15 @@
134134
var html = "";
135135
var id = el.attr('id') || multiselectID++; // unique ID for the label & option tags
136136

137+
// update header link container visibility if needed
138+
if (this.options.header) {
139+
if(!this.options.multiple) {
140+
this.headerLinkContainer.find('.ui-multiselect-all, .ui-multiselect-none').hide();
141+
} else {
142+
this.headerLinkContainer.find('.ui-multiselect-all, .ui-multiselect-none').show();
143+
}
144+
}
145+
137146
// build items
138147
el.find('option').each(function(i) {
139148
var $this = $(this);

0 commit comments

Comments
 (0)