File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 63
63
var _self = this ;
64
64
65
65
// do not include hidden elems if the menu isn't open.
66
- var selector = instance . _isOpen ? ':disabled, :hidden' : ':disabled' ;
66
+ var selector = _self . _isOpen ? ':disabled, :hidden' : ':disabled' ;
67
67
68
68
$inputs = $inputs
69
69
. not ( selector )
91
91
} ;
92
92
93
93
// rebuild cache when multiselect is updated
94
- var doc = $ ( document ) . bind ( 'multiselectrefresh' , $ . proxy ( function ( ) {
94
+ var doc = $ ( document ) . bind ( 'multiselectrefresh.' + instance . _namespaceID , $ . proxy ( function ( ) {
95
95
this . updateCache ( ) ;
96
96
this . _handler ( ) ;
97
97
} , this ) ) ;
98
98
99
99
// automatically reset the widget on close?
100
100
if ( this . options . autoReset ) {
101
- doc . bind ( 'multiselectclose' , $ . proxy ( this . _reset , this ) ) ;
101
+ doc . bind ( 'multiselectclose.' + instance . _namespaceID , $ . proxy ( this . _reset , this ) ) ;
102
102
}
103
103
} ,
104
104
Original file line number Diff line number Diff line change 434
434
// restored to their defaultValue prop on form reset, and the reset
435
435
// handler fires before the form is actually reset. delaying it a bit
436
436
// gives the form inputs time to clear.
437
- $ ( this . element [ 0 ] . form ) . bind ( 'reset.multiselect' , function ( ) {
437
+ $ ( this . element [ 0 ] . form ) . bind ( 'reset.' + this . _namespaceID , function ( ) {
438
438
setTimeout ( $ . proxy ( self . refresh , self ) , 10 ) ;
439
439
} ) ;
440
440
} ,
666
666
667
667
// unbind events
668
668
$doc . unbind ( this . _namespaceID ) ;
669
+ $ ( this . element [ 0 ] . form ) . unbind ( this . _namespaceID ) ;
669
670
670
671
this . button . remove ( ) ;
671
672
this . menu . remove ( ) ;
You can’t perform that action at this time.
0 commit comments