Support » Theme: Responsive » scroll-top blocks other plugin functionality on wp 4.5

  • Resolved visuallization


    Dear theme developers,

    I’ve upgraded today to wordpress 4.5 and discovered that some of the plugins were not working correctly anymore (in this specific case formidablepro forms the conditional logic).

    In the console the following error was thrown:
    Uncaught Error: Syntax error, unrecognized expression: a[href=#scroll-top]

    After some research I found out that the error originated from the responsive theme.
    So I went to the responsive-scripts-min.js and removed temporarily the specific line of code which was causing the problem:

    jQuery(document).ready(function ($) {
    $(‘a[href=#scroll-top]’).click(function () {
    $(‘html, body’).animate({
    scrollTop: 0
    }, ‘slow’);
    return false;

    And voila the error was gone and formidable plugin worked again.
    But of course this is only a temporarily solution which goes without the scroll top functionality.

    Could you please fix this in your next theme update? 🙂


Viewing 15 replies - 1 through 15 (of 29 total)
  • I had a similar issue where certain UI elements stopped working. (Like some interactive widgets via the Shortcode Ultimate plugin.) So I followed your advice to comment out the “scroll-top” code and it fixed my issues. Thank you for the tip. Hopefully the proper fix will be in the next release.

    Thank you for posting! We had the same error. We’re also using Responsive theme and suddenly our WooCommerce started to malfunction. By following your temporary fix, we got things working again. I also hope they fix it properly in the next release.

    Do not remove this code, just add additional quotes to the string href=#scroll inside square brackets, like this:

    jQuery(document).ready(function ($) {
    $('a["href=#scroll-top"]').click(function () {
    $('html, body').animate({
    scrollTop: 0
    }, 'slow');
    return false;

    and it will work with jQuery 1.12.3 as it did earlier with jQuery 1.11.3.
    The source of the information:

    Contact your theme or plugin developers in order they update their products to be compatible with jQuery 1.12.3.

    Thread Starter visuallization


    Thanks Vladimir for putting me into the right direction.
    But this code only nearly works.

    You would have to put the additional quotes only to the “#scroll-top” not the whole “href=#scroll-top”.

    The code would look like this now:

    jQuery(document).ready(function ($) {
    $('a[href="#scroll-top"]').click(function () {
    $('html, body').animate({
    scrollTop: 0
    }, 'slow');
    return false;

    This should work now and restore the scroll-top functionality while preserving other wp plugin logic.

    But thanks again for putting me into the right direction! 🙂

    Could the theme developers deploy this solution, once it is confirmed as a valid solution?

    That was a typo. Thanks for the update.

    Thank you for posting this – the ‘a[href=”#scroll-top”]’ edit fixed the problem that I was having with Ditty News Ticker plugin (stopped working) after upgrading to WP4.5 and running Responsive (Free) v1.9.8.0.

    I am rather new to the coding portion of sites and I have multiple websites this issue needs to be fixed on.

    Can you please direct me as to where I will find the jQuery code so i can get this fixed.

    Thank you.

    Divi Theme 2.3 & 2.6 from Elegant Themes is what I am using.

    Hi, julieayn,

    I’m new to this, too, but I suspect you should post that question in your theme’s support threads. If I’m not mistaken, this thread is specific to the change required in Cyberchimps Responsive Theme. Your required change may be the same, but the file/location may be specific to your theme.


    I have been building a large comprehensive site for a client of mine using the Trend Woocomerce them, which contains the “Visual Composer” as part of the inclusive package. I suddenly discovered that I was unable to use the both the Front and Backend function. I suspected that it may be the inclusive Visual Composer that had become corrupted so I purchased the fully licensed plugin and installed it thinking the update would resolve the problem. Unfortunately it didnt. I have a copy of wordpress on my home server that I use as a test site everything was working fine on there UNTIL i did the update to 4.5 and the problem appeared on that site. I have literally been tearing my hair out trying to resolve this problem, particularly as I had promised my client that his website would go live this weekend, that aint going to happen as I have been unable to put the final adjustments to the site.

    If anyone else has had this problem please advise on any fix you have found.

    To @julieayn:

    I tested Divi version
    It shows this error at the browser JavaScript console:

    jquery.js?ver=1.12.3:2 Uncaught Error: Syntax error, unrecognized expression: a[href*=#]:not([href=#])

    Search of this key a[href*=#]:not([href=#]) trough the all .js files shows the source of this problem.

    Open file: wp-content/themes/Divi/js/custom.js
    Go to line #706

    $( 'a[href*=#]:not([href=#])' ).click( function() {

    enclose # with double quotes, like this

    $( 'a[href*="#"]:not([href="#"])' ).click( function() {

    It fixes a JavaScript error which prevented jQuery code execution.
    Test this. I hope it will help to resolve your issue.

    To @smartalk:

    Make a context search of your theme JavaScript files for the occurrence of this key
    and look if some of them don’t uses quotes after =‘ sign. Edit those places.

    Hi Vladimir

    Many thanks for your prompt reply and advice, unfortunately my knowledge of JavaScript is virtually none existent. I wouldnt like to risk corrupting my site. Frustrating as it is I am going to have to wait for WordPress developers to come up with an update patch.

    I will just have to face my client tomorrow and hope he takes the news well

    Many Thanks


    Hi, julieayn,

    Looks like Divi theme developers posted new Divi theme(s) to resolve issues with WP4.5. I’m not sure they help you, but it might be worth a look.

    Here’s one of the posts for your info:

    Search of this key a[href*=#]:not([href=#]) trough the all .js files shows the source of this problem.

    How exactly do we do this?


    Cyberchimps posted Responsive (Free) v1.9.8.2 with the fix for this issue. I assume that means the fix is in their other themes as well.

Viewing 15 replies - 1 through 15 (of 29 total)
  • The topic ‘scroll-top blocks other plugin functionality on wp 4.5’ is closed to new replies.