Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/jquery.multiselect.filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
var _self = this;

// do not include hidden elems if the menu isn't open.
var selector = instance._isOpen ? ':disabled, :hidden' : ':disabled';
var selector = _self._isOpen ? ':disabled, :hidden' : ':disabled';

$inputs = $inputs
.not(selector)
Expand Down Expand Up @@ -91,14 +91,14 @@
};

// rebuild cache when multiselect is updated
var doc = $(document).bind('multiselectrefresh', $.proxy(function() {
var doc = $(document).bind('multiselectrefresh.'+ instance._namespaceID, $.proxy(function() {
this.updateCache();
this._handler();
}, this));

// automatically reset the widget on close?
if(this.options.autoReset) {
doc.bind('multiselectclose', $.proxy(this._reset, this));
doc.bind('multiselectclose.'+ instance._namespaceID, $.proxy(this._reset, this));
}
},

Expand Down
3 changes: 2 additions & 1 deletion src/jquery.multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
// restored to their defaultValue prop on form reset, and the reset
// handler fires before the form is actually reset. delaying it a bit
// gives the form inputs time to clear.
$(this.element[0].form).bind('reset.multiselect', function() {
$(this.element[0].form).bind('reset.' + this._namespaceID, function() {
setTimeout($.proxy(self.refresh, self), 10);
});
},
Expand Down Expand Up @@ -644,6 +644,7 @@

// unbind events
$doc.unbind(this._namespaceID);
$(this.element[0].form).unbind(this._namespaceID);

this.button.remove();
this.menu.remove();
Expand Down