Skip to content

Commit e7b973d

Browse files
author
ehynds
committed
Make the filter widget 1.8/1.9+ compatible
1 parent 1b17adb commit e7b973d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/jquery.multiselect.filter.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@
2727

2828
_create: function() {
2929
var opts = this.options;
30+
var elem = $(this.element);
3031

3132
// get the multiselect instance
32-
var instance = (this.instance = $(this.element).data('echMultiselect'));
33+
var instance = (this.instance = (elem.data('echMultiselect') || elem.data("multiselect")));
3334

3435
// store header; add filter class so the close/check all/uncheck all links can be positioned correctly
3536
var header = (this.header = instance.menu.find('.ui-multiselect-header').addClass('ui-multiselect-hasfilter'));
@@ -65,8 +66,8 @@
6566
var selector = instance._isOpen ? ':disabled, :hidden' : ':disabled';
6667

6768
$inputs = $inputs
68-
.not(selector)
69-
.each(this._toggleState('checked', flag));
69+
.not(selector)
70+
.each(this._toggleState('checked', flag));
7071

7172
// update text
7273
this.update();

0 commit comments

Comments
 (0)