• Resolved levelzwo

    (@levelzwo)


    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

    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

    (@strackerphil-1)

    Hi @levelzwo

    great finding! I will review this and implement it in the next plugin update

    Philipp ??

    Thread Starter levelzwo

    (@levelzwo)

    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

    (@strackerphil-1)

    Hi @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 [email protected] – I can then provide you with a custom patched version for testing, before doing the next public release.

    Philipp

    Thread Starter levelzwo

    (@levelzwo)

    Hey @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

    Now everything is fine! ??

    Wellington / levelzwo

    Plugin Contributor Philipp Stracker

    (@strackerphil-1)

    Hi @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.