How to clear fSelect
multi-select drop-down in click event, Here is an example By Clicking on Clear button It should remove all Selected value.
You could clear by looping through the option and unselect them like :
$(function() {
$('.my-select-box').fSelect();
$('#ClearSelect').click(function() {
$('#fselectMulti option:selected').removeAttr('selected');
$('.my-select-box').prev(".fs-dropdown").find(".fs-options .fs-option").each(function() {
$(this).removeClass('selected', false);
});
console.log($('#fselectMulti').val());
$('.fs-label').html('Select some options');
})
$('#CheckSelect').click(function(){
console.log($('#fselectMulti').val());
})
});