Mootools - Scope problem in IE
Im starting to play with mootools but not sure why the following will hide me options in a select list, but in IE it will not:
<select id="test_select开发者_开发问答" multiple>
<option>A</option>
<option>B</option>
<option>C</option>
</select>
$$('#test_select option').each(function(el){
el.addClass('hide');
});
I really would appreciate a bit of help on this...
To hide an option in a select you must remove the Option from the select in IE.
Here is an explanation in further detail Hide Option in Select
To remove option element from Select w/ Mootools you can do the following: jsfiddle
$$('#test_select option').each(function(el){
if(el.get("html") == 'A')
el.destroy();
});
精彩评论