ayilmaz ayilmaz - 6 months ago 80
Javascript Question

Regarding: jquery.js:2 Uncaught Error: Syntax error, unrecognized expression: #mobile-menu-toggle, #mobile-menu a[href*=#]

I am very new to Wordpress and my boss gives me a problem to solve in Wordpress...

jquery.js:2 Uncaught Error: Syntax error, unrecognized expression: #mobile-menu-toggle, #mobile-menu a[href*=#]


Can anybody give me a clue about what it means. Code is too huge to post here.

Answer

the # in the href must be escaped with 2 backslashes

#mobile-menu-toggle, #mobile-menu a[href*=\\#]

http://api.jquery.com/category/selectors/