Possible Duplicate:
How can I check whether a option already exist in select by JQuery
I have
<select name="saved" class="saved" multiple="multiple">
<option value="1">Hello</option>
<option value="2">Goodbye</option>
<option value="3">Wave</option>
</select>
how would I have Jquery check if there is already an option with value=”2″ in “saved” in an if statement
I am looking to see if it exists – not if it is selected.
I am using this in a function which may operate on more than one select box. the class name of the select box is now stored as a var “theSel” – how can I modify this for that
You can use
lengthproperty: