I\'m using Oleg\'s select2 demo, but I am wondering whether it would be possible to change the currently selected value in the dropdown menu.
For example, if the fou
You have two options - as @PanPipes answer states you can do the following.
$(element).val(val).trigger('change');
This is an acceptable solution only if one doesn't have any custom actions binded to the change event. The solution I use in this situation is to trigger a select2 specific event which updates the select2 displayed selection.
$(element).val(val).trigger('change.select2');