File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 73
73
this . update ( ) ;
74
74
75
75
// gather an array of the values that actually changed
76
- var values = $inputs . map ( function ( ) {
77
- return this . value ;
78
- } ) . get ( ) ;
76
+ var values = { } ;
77
+ $inputs . each ( function ( ) {
78
+ values [ this . value ] = true ;
79
+ } ) ;
79
80
80
81
// select option tags
81
82
this . element . find ( 'option' ) . filter ( function ( ) {
82
- if ( ! this . disabled && $ . inArray ( this . value , values ) > - 1 ) {
83
+ if ( ! this . disabled && values [ this . value ] ) {
83
84
_self . _toggleState ( 'selected' , flag ) . call ( this ) ;
84
85
}
85
86
} ) ;
Original file line number Diff line number Diff line change 517
517
this . update ( ) ;
518
518
519
519
// gather an array of the values that actually changed
520
- var values = $inputs . map ( function ( ) {
521
- return this . value ;
522
- } ) . get ( ) ;
520
+ var values = { } ;
521
+ $inputs . each ( function ( ) {
522
+ values [ this . value ] = true ;
523
+ } ) ;
523
524
524
525
// toggle state on original option tags
525
526
this . element
526
527
. find ( 'option' )
527
528
. each ( function ( ) {
528
- if ( ! this . disabled && $ . inArray ( this . value , values ) > - 1 ) {
529
+ if ( ! this . disabled && values [ this . value ] ) {
529
530
self . _toggleState ( 'selected' , flag ) . call ( this ) ;
530
531
}
531
532
} ) ;
545
546
if ( flag ) {
546
547
// remember which elements this widget disabled (not pre-disabled)
547
548
// elements, so that they can be restored if the widget is re-enabled.
548
- inputs = inputs . filter ( ':enabled' ) . data ( key , true )
549
+ inputs = inputs . filter ( ':enabled' ) . data ( key , true ) ;
549
550
} else {
550
551
inputs = inputs . filter ( function ( ) {
551
552
return $ . data ( this , key ) === true ;
You can’t perform that action at this time.
0 commit comments