Skip to content

Commit 5dc01a5

Browse files
committed
Fixed missing semicolons and other minor changes.
1 parent cee2870 commit 5dc01a5

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

jquery.selectBox.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ if(jQuery) (function($) {
2323
//
2424

2525
var init = function(select, data) {
26-
26+
27+
var options;
28+
2729
// Disable for iOS devices (their native controls are more suitable for a touch device)
2830
if( navigator.userAgent.match(/iPad|iPhone|Android|IEMobile|BlackBerry/i) ) return false;
2931

@@ -79,7 +81,7 @@ if(jQuery) (function($) {
7981
//
8082
// Inline controls
8183
//
82-
var options = getOptions(select, 'inline');
84+
options = getOptions(select, 'inline');
8385

8486
control
8587
.append(options)
@@ -133,7 +135,7 @@ if(jQuery) (function($) {
133135
// Update label
134136
label.attr('class', getLabelClass(select)).text(getLabelText(select));
135137

136-
var options = getOptions(select, 'dropdown');
138+
options = getOptions(select, 'dropdown');
137139
options.appendTo('BODY');
138140

139141
control
@@ -290,21 +292,21 @@ if(jQuery) (function($) {
290292
var getLabelClass = function(select) {
291293
var selected = $(select).find('OPTION:selected');
292294
return ('selectBox-label ' + (selected.attr('class') || '')).replace(/\s+$/, '');
293-
}
295+
};
294296

295297

296298
var getLabelText = function(select) {
297299
var selected = $(select).find('OPTION:selected');
298300
return selected.text() || '\u00A0';
299-
}
301+
};
300302

301303

302304
var setLabel = function(select) {
303305
select = $(select);
304306
var control = select.data('selectBox-control');
305307
if( !control ) return;
306308
control.find('.selectBox-label').attr('class', getLabelClass(select)).text(getLabelText(select));
307-
}
309+
};
308310

309311

310312
var destroy = function(select) {
@@ -344,7 +346,7 @@ if(jQuery) (function($) {
344346
// Auto-width
345347
if( settings.autoWidth ) options.css('width', control.innerWidth());
346348
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')));
348350
}
349351

350352
var borderBottomWidth = isNaN(control.css('borderBottomWidth')) ? 0 : parseInt(control.css('borderBottomWidth'));
@@ -825,7 +827,7 @@ if(jQuery) (function($) {
825827
if( self.attr('disabled') ) li.addClass('selectBox-disabled');
826828
if( self.attr('selected') ) li.addClass('selectBox-selected');
827829
options.append(li);
828-
})
830+
});
829831
};
830832

831833
//
@@ -836,7 +838,6 @@ if(jQuery) (function($) {
836838

837839
case 'control':
838840
return $(this).data('selectBox-control');
839-
break;
840841

841842
case 'settings':
842843
if( !data ) return $(this).data('selectBox-settings');

0 commit comments

Comments
 (0)