Joakim M Joakim M - 6 months ago 50
Javascript Question

jQuery upgrade makes poplight stop working

I have been trying to update my website from jQuery 1.4.3 to 1.11.1 the last days and of course ran into several issues. Most of them I have fixed but I don't understand the latest error I get.

Before when I wanted to show a popup dialog I used this function

a.poplight[href=#?w=270]


But now it says

Uncaught Error: Syntax error, unrecognized expression: a.poplight[href=#?w=270]

Anyone else have had this issue when upgrading jQuery and what might be the issue?

Answer

your are using double '=' sign in expression, it must be quoted as string
try this

a.poplight[href*='#?w=270']
Comments