Reputation: 47007
I'm trying to run this jQuery selector:
$("#label option[value=\"newLabel\"]")
On the following code:
<select name="label" id="label">
<option value="1" label="testLabel">testLabel</option>
<option value="newLabel" label="New Label">New Label</option>
</select>
But the selector just won't find it - can anyone spot where I'm going wrong?
Upvotes: 1
Views: 162
Reputation: 2379
Remove the quotes in the selector, i.e.:
$("#label option[value=newLabel]")
Upvotes: 1