diff --git a/src/jquery.bootstrap-duallistbox.js b/src/jquery.bootstrap-duallistbox.js index 37cf7cb..d2da57c 100644 --- a/src/jquery.bootstrap-duallistbox.js +++ b/src/jquery.bootstrap-duallistbox.js @@ -185,7 +185,7 @@ saveSelections(dualListbox, 1); } - dualListbox.elements.select1.find('option:selected').each(function(index, item) { + dualListbox.elements.select1.find('option:selected:enabled').each(function(index, item) { var $item = $(item); if (!$item.data('filtered1')) { changeSelectionState(dualListbox, $item.data('original-index'), true); @@ -205,7 +205,7 @@ saveSelections(dualListbox, 2); } - dualListbox.elements.select2.find('option:selected').each(function(index, item) { + dualListbox.elements.select2.find('option:selected:enabled').each(function(index, item) { var $item = $(item); if (!$item.data('filtered2')) { changeSelectionState(dualListbox, $item.data('original-index'), false); @@ -225,7 +225,7 @@ saveSelections(dualListbox, 1); } - dualListbox.element.find('option').each(function(index, item) { + dualListbox.element.find('option:enabled').each(function(index, item) { var $item = $(item); if (!$item.data('filtered1')) { $item.prop('selected', true); @@ -244,7 +244,7 @@ saveSelections(dualListbox, 2); } - dualListbox.element.find('option').each(function(index, item) { + dualListbox.element.find('option:enabled').each(function(index, item) { var $item = $(item); if (!$item.data('filtered2')) { $item.prop('selected', false);