Easy!
<select> <option value="Opt 1.">Opt 1.</option> <option class="optionselector" value="Opt 2. I'm disabled!" disabled="disabled">opt 2. I'm disabled!</option> </select>
Just add disabled="disabled" to the tag.
To do this in jQuery, make sure you have the latest version installed, and then use javascript.attr () to add the disabled="disabled" attribute as needed:
.click(function(){ $('.optionselector').attr("disabled","disabled"); });
Of course, you will need to install .click inside another event or function, so .click is triggered by SOMETHING, in particular, this can be used to say "When I .click () this button, then add .attr ()", etc. .
source share