@@ -23,7 +23,9 @@ if(jQuery) (function($) {
23
23
//
24
24
25
25
var init = function ( select , data ) {
26
-
26
+
27
+ var options ;
28
+
27
29
// Disable for iOS devices (their native controls are more suitable for a touch device)
28
30
if ( navigator . userAgent . match ( / i P a d | i P h o n e | A n d r o i d | I E M o b i l e | B l a c k B e r r y / i) ) return false ;
29
31
@@ -79,7 +81,7 @@ if(jQuery) (function($) {
79
81
//
80
82
// Inline controls
81
83
//
82
- var options = getOptions ( select , 'inline' ) ;
84
+ options = getOptions ( select , 'inline' ) ;
83
85
84
86
control
85
87
. append ( options )
@@ -133,7 +135,7 @@ if(jQuery) (function($) {
133
135
// Update label
134
136
label . attr ( 'class' , getLabelClass ( select ) ) . text ( getLabelText ( select ) ) ;
135
137
136
- var options = getOptions ( select , 'dropdown' ) ;
138
+ options = getOptions ( select , 'dropdown' ) ;
137
139
options . appendTo ( 'BODY' ) ;
138
140
139
141
control
@@ -290,21 +292,21 @@ if(jQuery) (function($) {
290
292
var getLabelClass = function ( select ) {
291
293
var selected = $ ( select ) . find ( 'OPTION:selected' ) ;
292
294
return ( 'selectBox-label ' + ( selected . attr ( 'class' ) || '' ) ) . replace ( / \s + $ / , '' ) ;
293
- }
295
+ } ;
294
296
295
297
296
298
var getLabelText = function ( select ) {
297
299
var selected = $ ( select ) . find ( 'OPTION:selected' ) ;
298
300
return selected . text ( ) || '\u00A0' ;
299
- }
301
+ } ;
300
302
301
303
302
304
var setLabel = function ( select ) {
303
305
select = $ ( select ) ;
304
306
var control = select . data ( 'selectBox-control' ) ;
305
307
if ( ! control ) return ;
306
308
control . find ( '.selectBox-label' ) . attr ( 'class' , getLabelClass ( select ) ) . text ( getLabelText ( select ) ) ;
307
- }
309
+ } ;
308
310
309
311
310
312
var destroy = function ( select ) {
@@ -344,7 +346,7 @@ if(jQuery) (function($) {
344
346
// Auto-width
345
347
if ( settings . autoWidth ) options . css ( 'width' , control . innerWidth ( ) ) ;
346
348
if ( options . innerWidth ( ) < control . innerWidth ( ) ) {
347
- options . css ( 'width' , control . innerWidth ( ) - parseInt ( options . css ( 'padding-left' ) ) - parseInt ( options . css ( 'padding-right' ) ) )
349
+ options . css ( 'width' , control . innerWidth ( ) - parseInt ( options . css ( 'padding-left' ) ) - parseInt ( options . css ( 'padding-right' ) ) ) ;
348
350
}
349
351
350
352
var borderBottomWidth = isNaN ( control . css ( 'borderBottomWidth' ) ) ? 0 : parseInt ( control . css ( 'borderBottomWidth' ) ) ;
@@ -825,7 +827,7 @@ if(jQuery) (function($) {
825
827
if ( self . attr ( 'disabled' ) ) li . addClass ( 'selectBox-disabled' ) ;
826
828
if ( self . attr ( 'selected' ) ) li . addClass ( 'selectBox-selected' ) ;
827
829
options . append ( li ) ;
828
- } )
830
+ } ) ;
829
831
} ;
830
832
831
833
//
@@ -836,7 +838,6 @@ if(jQuery) (function($) {
836
838
837
839
case 'control' :
838
840
return $ ( this ) . data ( 'selectBox-control' ) ;
839
- break ;
840
841
841
842
case 'settings' :
842
843
if ( ! data ) return $ ( this ) . data ( 'selectBox-settings' ) ;
0 commit comments