Hiding Optgroups and Options
I'm trying to hide all optgroup's and their child option's with jQuery .hide().
//jquery
<script type="text/javascript">
$(function() {
$("#test").children("optgroup").hide();
});
</script>
//html
<select name="test" id="test" multiple="multiple">
<optgroup id="a1">
<option value="">11</option>
<option value="">22</option>
<option value="">33</option>
</optgroup>
<optgroup id="a2">
<option value="">11</option>
<option value="">22</option>
<option value="">33</option>
</optgroup>
</select>
While this works in Firefox it fails in webkit browsers - any ideas?