0

If select dropdown has 10 options. I want to disable few options from that. For example

<select>
    <option value="">Select</option>
    <option value="1">Value 1</option
    <option value="2">Value 2</option
    <option value="3">Value 3</option
    <option value="4">Value 4</option
    <option value="5">Value 5</option
</select>

In above example, how can we disable two options with value "3" and "5" using jquery? So that user won't be able to select "Value 3" and "value 5" options.

Rishabh
  • 560
  • 2
  • 9
  • 27
  • `$("select option[value=3]").attr("disabled", "disabled")` https://jsfiddle.net/w43561bp/ pretty sure they'll be existing question*s* for this (edit: as demonstrated) – freedomn-m May 16 '22 at 10:57

0 Answers0