I want to unselect all the other option when i selected the option with value 0. On the other way, I need to unselect the option with value 0 when i select other value that is not 0. Please help me, below are my code.
<script type="text/javascript">
$(document).ready(function() {
$('.sumomultiple').SumoSelect();
$('.sumomultiple')[0].sumo.selectItem("0");
});
</script>
<select id="st_type" class="sumomultiple table-group-action-input form-control" multiple="multiple" placeholder="Unselect All" onchange="$('#s_transtype').val($(this).val())">
<option value="0">Unselect All</option>
<option value="23">A</option>
<option value="24">B</option>
<option value="25">C</option>
</select>
$('#st_type').change(function(){
// Please Help Here
});
I already try many ways i still have no idea how to do it, PLease help me. Thank you very much...
This behaviour is built in to SumoSelect, there is no need to write it yourself. Use the
selectAlloption in the settings to enable it:I'd suggest reading the library documentation and viewing the examples to understand more about the features available.