I just loaded jQuery Tools onto my site. But the Google Chrome console shows an error:
Uncaught Error: Syntax error, unrecognized expression: [href=/] (http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js)
The jQuery version I am using is 1.7.1
How to deal with this problem?
I’m assuming you have a selector that is meant to match elements with an
hrefattribute value of/. You will need to put the/character in quotes:Alternatively, you can escape the character:
From the jQuery docs:
Here’s a working example. Remove the quotes to generate the same error you mention in your question.