I’m running a WordPress website for a client and getting this in the console.
Uncaught Error: Syntax error, unrecognized expression: [href=#]
I know about this error with the latest WordPress update:
Syntax error, unrecognized expression: a[href*=#]:not([href=#])
However my error seems to be something else. Can anyone tell me what I should be looking at to fix this? Thanks.
You need to wrap the
#
in quotes in the selector so that it is not interpreted as anid
selector:From the spec
and
#
is not a valid identifier, so you have to represent it as a string, so you have to surround it with quotes.Such: