Support » Plugin: Easy Smooth Scroll Links » Plugin is not working with WordPress 4.5

  • Resolved zilek

    (@zilek)


    After updating to 4.5 the plugin stopped working.
    It gives an error:
    Uncaught Error: Syntax error, unrecognized expression: area[href*=#],a[href*=#]:not([href=#]):not([href^=’#tab’]):not([href^=’#quicktab’]):not([href^=’#pane’])

    It’s jQuery problem…
    Any idea how to fix this?

    Thanks

    https://wordpress.org/plugins/easy-smooth-scroll-links/

Viewing 15 replies - 1 through 15 (of 17 total)
  • I’m also getting the same error after upgrading to WordPress 4.5. Nothing to do with the Easy Smooth Scroll Links plugin though… it has just stopped all the anchor links on my website (tangotrips.com) – stop working. If anyone has any ideas how to fix please let us know! Cheers 🙂

    PS – The exact error I am getting when using the “inspect” function on Google Chrome is:

    Uncaught Error: Syntax error, unrecognized expression: a[href*=#]

    Which is found in a line of code in:

    http://tangotrips.com/wordpress/wp-includes/js/jquery/jquery.js?ver=1.12.3

    Sorry for all the posts one after another.

    Please refer to https://github.com/jquery/jquery/issues/2885

    your selector is not valid. # is a special char and needs to be escaped like 'a[href*=\\#]:not([href=\\#])'

    Thanks timdoes! I think this is in the WordPress 4.5 code though? Who or how do I contact at WordPress to get this fixed in the next release? I don’t want to go around messing with the WordPress source code (I’m already in way over my head on this). Cheers!

    Thanks timdoes!
    Bsaires, actually it does have everything to do with the plugin, but it is simple to fix.
    I changed # to \\# in index.php of Easy Smooth Scroll Links plugin and it works now.

    I don’t have the Easy Smooth Scroll Links plugin, zilek! So it can’t be anything to do with that.

    The error code for me is within the WP-includes folder, under javascript.

    At least, in my case, it can’t be to do with that plugin.

    I see. I thought you have the same plugin… WordPress 4.5 updates jQuery… so it shows you js error but the error is probably in your theme or plugins folder.
    Read this:
    https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list?replies=6

    Thanks again zilek. It was indeed that old, wrong javascript in my theme. The theme provider just pushed through an update to fix it 🙂

    Plugin Author JeriffCheng

    (@jeriff-cheng)

    Update it.
    2.1

    Thank you!

    Thanks JeriffCheng!

    babaLucas

    (@babalucas)

    Still having issue with this on two sites.

    One is http://dev.babalucas.com/gypsysoul

    Plugin Author JeriffCheng

    (@jeriff-cheng)

    @babalucas

    // Adds class to our header upon scroll
    	jQuery(window).scroll(function() {
    
    	    if(jQuery(this).scrollTop() > 0) {
    	    	jQuery('#header').addClass('movement');
    	    } else {
    	    	jQuery('#header').removeClass('movement');
    	    }
    
    	});
    
    // Smooth Scrolling
    	jQuery(function($) {
    	  $('a[href*=#]:not([href=#])').click(function() {
    	    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
    	      var target = $(this.hash);
    	      target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
    	      if (target.length) {
    	        $('html,body').animate({
    	          scrollTop: target.offset().top - 100
    	        }, 1000);
    	        return false;
    	      }
    	    }
    	  });
    	});
    
    </script>

    Your theme or other plugin contains this code block. which is in conflict with

    Easy Smooth Scroll Links

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Plugin is not working with WordPress 4.5’ is closed to new replies.