I am trying to use the "not" selector to hide certain options in a dropdown box. Evidently I'm not getting it. Can someone please tell me what my misunderstanding is here. I would very much appreciate the help as I'm kind of stuck. I'm trying not to have to use the .each with arrays here because that gets complicated for me. thanks -dave
<script>
$(document).ready(function(){
//$("option:contains('CommitteeAction')").not().hide();
//
$("option:not(option:not('CommitteeAction')").hide() //even tried the double negative!
$("option:not(option:contains('CommitteeAction')").hide() //give me the opposite of what i'd like
});
</script>
<td valign="top" nowrap="" class="ms-formlabel">Content Type</td>
<td valign="top" class="ms-formbody"><select name="ctl00$m$g_4e27d02a_5beb_43bf_83d1_69d38c617ece$ctl00$ctl03$ctl00$ContentTypeChoice" title="Content Type" onchange="javascript:ChangeContentType("ctl00_m_g_4e27d02a_5beb_43bf_83d1_69d38c617ece_ctl00_ctl03_ctl00_ContentTypeChoice");return false;" id="ctl00_m_g_4e27d02a_5beb_43bf_83d1_69d38c617ece_ctl00_ctl03_ctl00_ContentTypeChoice">
<option value="0x0120D5200022E7569C62963E469B62F73D4190A3B01B010085E2D9F7BC4678479F8C09308CF861A6">IRBCommitteeActionForm</option>
<option value="0x0120D5200022E7569C62963E469B62F73D4190A3B01B02001D86B7BFD8A63440A50FF1276ECC3BCC">IACUCCommitteeAction</option>
<option value="0x0120D5200022E7569C62963E469B62F73D4190A3B01B0300A1B16816E11DD445AAD8C5A8170177AC">SafetyCommitteeAction</option>
<option value="0x0120D5200022E7569C62963E469B62F73D4190A3B01B0400B27BB6262B4F5446BB5BD60105D7BD5F" selected="">RDCommitteeAction</option>
<option value="0x0120D5200022E7569C62963E469B62F73D4190A3B003010040C514B859A5C647B73BA776CFB44A2C">IRB
Initial Database Submission PHX</option> <option value="0x0120D5200022E7569C62963E469B62F73D4190A3B01902000EE375B5FE82624A8607ADAB453AA00B">IRB
Initial Submission Boston</option> <option value="0x0120007192F2387B51CF4DAB8EE0C304C1FABC">Folder</option></select><br></td></tr>