Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions jquery.selectBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@
if (settings.styleClass) {
options.addClass(settings.styleClass);
}

if (select.triggerHandler('beforeopen')) {
return false;
}
Expand Down Expand Up @@ -1047,8 +1047,8 @@
setOptions : function (options) {
var select = $(this)
, control = select.data('selectBox-control');


switch (typeof(options)) {
case 'string':
select.html(options);
Expand Down Expand Up @@ -1077,12 +1077,12 @@
// Refresh the control
$(this).selectBox('refresh');
// Remove old options

}
},



selectBox: function (method, options) {
var selectBox;

Expand All @@ -1099,11 +1099,11 @@
break;
case 'options':
// Getter

if (undefined === options) {
return $(this).data('selectBox-control').data('selectBox-options');
}

// Setter
$(this).each(function () {
$(this).setOptions(options);
Expand Down Expand Up @@ -1132,13 +1132,19 @@
if (selectBox = $(this).data('selectBox')) {
selectBox.enable(this);
}
else{
$(this).attr('disabled',false);
}
});
break;
case 'disable':
$(this).each(function () {
if (selectBox = $(this).data('selectBox')) {
selectBox.disable();
}
else{
$(this).attr('disabled','disabled');
}
});
break;
case 'destroy':
Expand Down