I have two select
dropdown. First one's name is ``minimumand the second one's name is
maximum` and both have a list of numbers from 1-25.
I want that is if I select any value from the minimum
dropdown (e.g.: 4), the other maximum
dropdown should allow me to select only those values which are equal or greater than the first dropdown value (e.g.: in this case values should be greater or equal to 4).
$(".selectClass").change(function() {
$("select option").prop("disabled", false);
$(".selectClass").not($(this)).find("option[value='" + $(this).val() + "']").prop("disabled", true);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<select class="selectClass" id="min">
<option value="">minimum</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
<select class="selectClass" id="max">
<option value="">maximum</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
Can anyone please suggest me how to do it.