Side navigation
#4131 closed bug (duplicate)
Opened February 11, 2009 11:18PM UTC
Closed February 14, 2009 05:22PM UTC
Last modified March 14, 2012 01:36PM UTC
Can't check for non-blank attributes
Reported by: | chrisbarr | Owned by: | john |
---|---|---|---|
Priority: | major | Milestone: | 1.3.2 |
Component: | selector | Version: | 1.3.1 |
Keywords: | attribute notEqual attributeNotEqual blank | Cc: | |
Blocked by: | Blocking: |
Description
I had an occasion where I needed to find all links of with a certain class which also did not have a blank title attribute. I thought to use the attributeNotEqual filter found here: http://docs.jquery.com/Selectors/attributeNotEqual
I ran something similar to this code:
$(".hello[title!='']").css("background-color","red");
And firebug returns:
uncaught exception: Syntax error, unrecognized expression: title!='']
Demo here: http://jsbin.com/ibupo
Editable demo: http://jsbin.com/ibupo/edit
Putting anything inside the quotes works as expected, but apparently you can't find elements without a blank attribute.
Attachments (0)
Change History (4)
Changed February 11, 2009 11:21PM UTC by comment:1
Changed February 12, 2009 03:33AM UTC by comment:2
Chris, does it look like this bug is the same as yours? If so it should be fixed in the next release.
Changed February 12, 2009 04:31AM UTC by comment:3
Yes, that appears to be the exact same problem. Sorry about the duplicate ticket, but I'm glad to see it's been fixed!
Changed February 14, 2009 05:22PM UTC by comment:4
resolution: | → duplicate |
---|---|
status: | new → closed |
So.... the code sample I wrote above did not format correctly in here. Please check the example I linked to. http://jsbin.com/ibupo/edit