how to avoid duplicate values in dropdownlist using jquery
$(".select option").val(function(idx, val) {
$(this).siblings('[value="'+ val +'"]').remove();
});
how to avoid duplicate values in dropdownlist using jquery
$(".select option").val(function(idx, val) {
$(this).siblings('[value="'+ val +'"]').remove();
});
how to avoid duplicate values in dropdownlist using jquery
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<select class="select">
<option value="">All</option>
<option value="com">.com 1</option>
<option value="net">.net 1</option>
<option value="com">.com 2</option> <!-- will be removed since value is duplicate -->
<option value="net">.net 2</option> <!-- will be removed since value is duplicate -->
</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