• Resolved Zoee

    (@epixmedia)


    Hi, we use this plugin a lot and have never had any conflict issues, so I’m a little baffled as to why its not working.

    We’re getting this error in the console:
    Error: Syntax error, unrecognized expression: https://youtu.be/h0PiJtvI2wQ
    …value:null},fa.error=function(a){throw new Error(“Syntax error, unrecognized exp…

    It happens on videos, images, everything we’ve tried.

    I’ve checked your known conflicts and have altered the setting on ithemes security, I’ve also checked for non-enqueued js files and whilst I found a couple, removing them made no difference.

    Any ideas?

    Thanks 🙂

    Zoe

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Zoe, can you share a link to see the issue live? The browser developer tools console might show errors to reveal the problem / conflict…

    Thread Starter Zoee

    (@epixmedia)

    Hi Ravan, the error I posted above is the error from the developer console. The URL is uolcareers.co.uk and the video is full width with a play icon over it, so you can’t miss it (its about half way down).

    I’ve set it to open in a new window so you can see the console error. Without that the error flashes up then the console reloads on the youtube page 🙂

    Thanks for your help!

    Zoe

    Sadly, that is the only error that seems to occur and it does not tell us anything meaningful as to where this conflict is coming from. Have you tried disabling all other plugins? If that solves it, enable them one by one and test each time to find out which one causes the conflict.

    If not, then it must be one of the scripts that are added in the themes footer.php … you could switch to the twentysixteen theme for a minute to see if that fixes it.

    Or make a backup of the footer.php file and try removing them.

    Please let me know if you find the conflicting script. I’d like to investigate further if possible 🙂

    Update: it’s this script snippet that lives all the way at the bottom in footer.php

    
    <script type="text/javascript">
      var jQueryroot = jQuery('html, body');
      jQuery('a').click(function() {
          var href = jQuery.attr(this, 'href');
          jQueryroot.animate({
              scrollTop: jQuery(href).offset().top
          }, 500, function () {
              window.location.hash = href;
          });
          return false;
      });
    </script>
    

    The script is meant to kick in on every link click. This interferes with FancyBox trying to capture the click event. Remove that snippet or adapt it to only dedicate itself to internal page anchor links.

    Thread Starter Zoee

    (@epixmedia)

    Thanks for that! have been more specific and thats sorted it 🙂

    Really appreciate the help!

    • This reply was modified 9 years, 8 months ago by Zoee.

    Excellent 🙂 (marking as solved)

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

The topic ‘JQuery error’ is closed to new replies.