I have a set of Yes/No dropdowns and I'd like to select all select elements with a value of Yes.
<select name="foo1">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<select name="foo2">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<select name="foo3">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
I'd like a JQuery selector that returns a subset of select nodes which are currently in a state of Yes. I realize I can do a simple call to filter(), but I would much rather do it all in a selector.
$('#myform select').filter(function(k,v){return v.value == 'yes';})
Thanks in advance.
filtermethod, faster and promising.