Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
93
rated 0 times [  94] [ 1]  / answers: 1 / hits: 40215  / 13 Years ago, wed, july 27, 2011, 12:00:00

How do you disable some items of a drop down element using jQuery or JavaScript?


More From » jquery

 Answers
54

The same way you would disable any other HTML element, use



$(/* option selector */).prop('disabled', true);


See it in action.


[#90984] Tuesday, July 26, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aleenamarinr

Total Points: 610
Total Questions: 109
Total Answers: 118

Location: Mayotte
Member since Mon, Sep 12, 2022
2 Years ago
;