I'm trying to upgrade from jquery 1.4.2 to 1.5.1 and I'm getting the following error:
Uncaught Syntax error, unrecognized expression: [rel*=address:]
I can't figure out what it's related to. Any ideas?
I'm trying to upgrade from jquery 1.4.2 to 1.5.1 and I'm getting the following error:
Uncaught Syntax error, unrecognized expression: [rel*=address:]
I can't figure out what it's related to. Any ideas?
Share Improve this question edited Jul 24, 2011 at 23:31 Lightness Races in Orbit 386k77 gold badges666 silver badges1.1k bronze badges asked Jul 24, 2011 at 23:07 LorenzLorenz 7751 gold badge7 silver badges28 bronze badges 03 Answers
Reset to default 11attribute selector needs to be enclosed by quote "
i.e. [rel*="address:"]
I think you have to escape the colon in the attribute:
If you wish to use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[]^`{|}~ ) as a literal part of a name, you must escape the character with two backslashes: \. For example, if you have an element with id="foo.bar", you can use the selector $("#foo\.bar"). http://api.jquery./category/selectors/
Earlier versions of jquery seemed to be more forgiving
It may be that jQuery 1.4.2 just so happened to accept your invalid expression, but the correct expression is:
[rel*="address:"]
This is why it's very important that you read the documentation and use the correct syntax, regardless of whether or not your broken code "appears to work".