How to reset one Bootstrap Multiselect when another Bootstrap Multiselect is used via jQuery

I suspect you need to reset the select element and then do the refresh, like so:

$("#dropdown1").change(function () {
    $('#dropdown2 option:selected').each(function() {
        $(this).prop('selected', false);
    })
    $('#dropdown2').multiselect('refresh');
});

$("#dropdown2").change(function () {
    $('#dropdown1 option:selected').each(function() {
        $(this).prop('selected', false);
    })
    $('#dropdown1').multiselect('refresh');
});

That code is borrowed from the reset button code on the Bootstrap Multiselect site. See the further examples


Another way of deselecting all options. (Because multiselect('refresh') did not work for me.)

$('#ID').multiselect('deselectAll', false);    
$('#ID').multiselect('updateButtonText');

This is working for me.

$('#ID').val('').multiselect('refresh');