-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
I have this select:
<select id="myselect" name="test" multiple="multiple">
<option value="40">A</option>
<option value="75">B</option>
<option value="41">C</option>
<option selected="selected" data-bsm-order="1" value="29">D</option>
<option value="39">E</option>
<option value="23">F</option>
<option selected="selected" data-bsm-order="0" value="44">G</option>
<option value="62">H</option>
<option value="38">I</option>
<option value="61">J</option>
</select>
And the Javascript:
jQuery("#myselect").bsmSelect({
addItemTarget: 'original',
plugins: [jQuery.bsmSelect.plugins.sortable(), jQuery.bsmSelect.plugins.compatibility()]
});
The select is showed in the correct order. Then I change the order and after I add an option:
var option = jQuery("<option>", { text: 'NEW', selected: "selected"});
jQuery("#myselect").append(option).change();
But the order of the options is changed to the initial and not to the last order.
Metadata
Metadata
Assignees
Labels
No labels