Hide select option Cross Browser
- by Tapas Bose
Isn't there any way to do it?
I have made jsFiddle which is not working in IE.
The piece of code is given below:
The HTML
<select id="testing">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
The jQuery
$(document).ready(function() {
$('select#testing option').eq(1).attr({
disabled: 'disabled'
});
});
The CSS
select option[disabled] {display: none;}
Any pointer would be helpful.
Note: I cannot use .remove() method.