[jQuery] td[title=''] vs td:not([title])

[jQuery] td[title=''] vs td:not([title])


Hi
I've been playing with jQuery selectors and i found something
strange:
I have a table like this:
<table>
<tr>
<td title='test'/>
<td title=''/>
<td/>
</tr>
</table>
Now, when i try to use jQuery to select all TD's that do not have a
title attribute:
td:not([title])
this selects the last two td's, so the one with title='' is included.
if i try td[title=''] it gives me the last two as well
if i try td[title] to see the reverse effect, it gives me only the
first TD!
Is this a bug??
Michaël




















    • Topic Participants

    • info