select2 disable search
$("#js-example-basic-hide-search").select2({
minimumResultsForSearch: Infinity
});
select2 disable search
$("#js-example-basic-hide-search").select2({
minimumResultsForSearch: Infinity
});
select2 search disable
$("#js-example-basic-hide-search").select2({
minimumResultsForSearch: -1
});
disable other options in select except the selected
$("#lbCountries").click(function () {
$("#lbCountires option").each(function (index) {
if ($(this).is(':selected')) {
$(this).prop('disabled', false);
}
else {
$(this).prop('disabled', true);
}
});
});
select2 full width
<select class="js-example-responsive" style="width: 50%"></select>
<select class="js-example-responsive" multiple="multiple" style="width: 75%"></select>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us