Syntax error, unrecognized expression: [rel*=name:] with jQuery 1.5 and greater

jQuery uncaught exception: syntax error, unrecognized expression [ tabindex=”someword”]

This error was occuring while using the syntax in jquery 1.5 or greater. The syntax seem to be working in jquery 1.4.

Example
Error: Syntax error, unrecognized expression: a[rel=Some text here]
Source File: http://www.somedomain.com/js/jquery/jquery.js?ver=1.8.3

Solution
For the above code Change the syntax from

a[rel=Some text here]

to

a[rel="Some text here"]

Now it works.

Sharing is caring!

Leave a Comment