I want to deselect all values with one click without using each id
seperately.
I fiddled around for a while, but this deselect only first value. Any suggestions?
This is how I try to deselect:
$( "#mybutton" ).click(function() {
$("select").select2('val', '')
});
$("select").val('').change();
That is all :) http://jsfiddle.net/6hZFU/78/
Explanation: when you change value of any input or select through JavaScript browser will not fire change event for that change (that is how specs say).
When you fire change event select2 will catch up and reflect new value of select.