Title: jQuery Error: unrecognized expression
Last modified: October 1, 2018

---

# jQuery Error: unrecognized expression

 *  Resolved [levelzwo](https://wordpress.org/support/users/levelzwo/)
 * (@levelzwo)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/jquery-error-unrecognized-expression-2/)
 * Hi guys,
 * many thanks for this plugin.
 * I have an issue in the front.js file, the target element for links is not working.
 * Old:
    jQuery(“[href^=#]”,a) throws an error: “unrecognized expression: [href^
   =#]” You can find the fix in the link below, you have to escape the #.
 * New:
    jQuery(“[href^=\\#]”,a)
 * See:
    [https://github.com/jquery/jquery/issues/2885#issuecomment-176856390](https://github.com/jquery/jquery/issues/2885#issuecomment-176856390)
 * File to fix: js/front.js
 * After escaping the # everything works well. Consider that for the next update.
 * Best regards
    Wellington / levelzwo

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [Philipp Stracker](https://wordpress.org/support/users/strackerphil-1/)
 * (@strackerphil-1)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-error-unrecognized-expression-2/#post-10844782)
 * Hi [@levelzwo](https://wordpress.org/support/users/levelzwo/)
 * great finding! I will review this and implement it in the next plugin update
 * Philipp 🙂
 *  Thread Starter [levelzwo](https://wordpress.org/support/users/levelzwo/)
 * (@levelzwo)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-error-unrecognized-expression-2/#post-10860128)
 * Hi Philipp,
 * the error still exists after the update to a new version. Could be a minimize
   error that removes the escaping?
 * Please take a look at it.
 * Best regards
    Wellington / levelzwo
 *  Plugin Contributor [Philipp Stracker](https://wordpress.org/support/users/strackerphil-1/)
 * (@strackerphil-1)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-error-unrecognized-expression-2/#post-10868156)
 * Hi [@levelzwo](https://wordpress.org/support/users/levelzwo/)
 * I had already prepared the last update when I reviewed your bug report. Right
   now a new update is underway (1.2.3) which solves this issue as well.
 * However, I could not reproduce the jQuery error on my websites, so I’m looking
   forward to your feedback if this update solved your problem.
 * If there’s anything not working as expected, you can also send me a slack message(
   WordPress slack channel) or a quick mail to [stracker.phil@gmail.com](https://wordpress.org/support/topic/jquery-error-unrecognized-expression-2/stracker.phil@gmail.com?output_format=md)–
   I can then provide you with a custom patched version for testing, before doing
   the next public release.
 * Philipp
 *  Thread Starter [levelzwo](https://wordpress.org/support/users/levelzwo/)
 * (@levelzwo)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-error-unrecognized-expression-2/#post-10871205)
 * Hey [@strackerphil-1](https://wordpress.org/support/users/strackerphil-1/),
 * your update fixed the issue, thank you.
    I dequeued jquery migrate, maybe that
   caused the error. jQuery changed that behaviour some versions ago. Take a look
   at the bug report: [https://github.com/jquery/jquery/issues/2824](https://github.com/jquery/jquery/issues/2824)
 * Now everything is fine! 🙂
 * Wellington / levelzwo
 *  Plugin Contributor [Philipp Stracker](https://wordpress.org/support/users/strackerphil-1/)
 * (@strackerphil-1)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-error-unrecognized-expression-2/#post-10871568)
 * Hi [@levelzwo](https://wordpress.org/support/users/levelzwo/)
 * thanks for the tip about jQuery migrate and the jquery-changelog/issue. I’ll 
   include that in my future tests to make sure it does not happen again.
 * It’s great to hear, that everything is working for you! 🙂
 * Philipp

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘jQuery Error: unrecognized expression’ is closed to new replies.

 * ![](https://ps.w.org/popups-for-divi/assets/icon-256x256.jpg?rev=2553226)
 * [Popups for Divi](https://wordpress.org/plugins/popups-for-divi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popups-for-divi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popups-for-divi/)
 * [Active Topics](https://wordpress.org/support/plugin/popups-for-divi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popups-for-divi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popups-for-divi/reviews/)

## Tags

 * ["js error"](https://wordpress.org/support/topic-tag/js-error/)
 * [jquery error](https://wordpress.org/support/topic-tag/jquery-error/)

 * 5 replies
 * 2 participants
 * Last reply from: [Philipp Stracker](https://wordpress.org/support/users/strackerphil-1/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-error-unrecognized-expression-2/#post-10871568)
 * Status: resolved