var config = { '.chosen-select' : {}, '.chosen-select-deselect' : {allow_single_deselect:true}, '.chosen-select-no-single' : {disable_search_threshold:10}, '.chosen-select-no-results': {no_results_text:'Oops, nothing found!'}, '.chosen-select-width' : {width:"95%"} } for (var selector in config) { $(selector).chosen(config[selector]); }
Use the above configuration and apply class='chosen-select-deselect' to manually deselect and set the value to empty
or if you want to deselect all combos, then apply the configuration as shown below
var config = { '.chosen-select' : {allow_single_deselect:true},//Remove if you do not need X button in combo '.chosen-select-deselect' : {allow_single_deselect:true}, '.chosen-select-no-single' : {disable_search_threshold:10}, '.chosen-select-no-results': {no_results_text:'Oops, nothing found!'}, '.chosen-select-width' : {width:"95%"} } for (var selector in config) { $(selector).chosen(config[selector]); }
NIrav Modi Jul 24 '15 at 3:35 2015-07-24 03:35
source share