I am making a multiselectlist in MVC. The html for it comes out like this:
<select multiple="multiple" id="foo" name="foo">
<option value="15">Doctor of Medicine</option>
<option value="10">Doctor of Osteopathy</option>
...
I am trying to remove or hide an option using jquery:
$('#foo option:contains("' + removeThis + '")').remove();
or
$('#foo option:contains("' + removeThis + '")').hide();
The first does nothing. The second seems to add a display: none to the html, but it has no affect on the list item (you can still see it). Why not? How do I edit it?