[jQuery] Broken selector in jQuery 1.3
Hello,
I just updated to jQuery 1.3 and I am having trouble with the following selector:
var options = $('option[value=""]');
Firebug says:
[Exception... "'Syntax error, unrecognized expression: value=""]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
This selector used to work in jQuery 1.2 and I need to know how I can re-write the selector to be 1.3-compatible.
The HTML snippet looks something like this:
<span style="font-family: courier new,monospace;"><select></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><b style="font-family: courier new,monospace; color: rgb(0, 153, 0);"><option value="">Select One</option></b><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> <option value="foo">Foo</option></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <option value="bar">Bar</option></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></select></span><br style="font-family: courier new,monospace;">
I need to select the option that doesn't have a value and I'd like to avoid using class names. Any suggestions?
<br clear="all">-Hector