• I installed this plugin on several websites without any issue. Unfortunately, recently we needed to switch to “Consent on scroll” and it seems that this specific function doesn’t work in conjunction with Avada (any version), at least not with a sticky menu activated (the standard behavior). The cookie bar doesn’t show up – better said, it does just for a moment, then it automatically disappears and the page is reloaded, exactly as when the user scrolls the page.
    I didn’t find any solution online, so I tried to fix the bug myself and it worked.
    I modified the source code in wp-content/plugins/eu-cookie-law/js/scripts.js
    Row 40-46: replace with the following
    jQuery(window).scroll(function(){
    var scrollTop = jQuery(window).scrollTop(); // new
    if ( scrollTop > 10 ) { // new
    if ( scrollConsent > 0 && document.cookie.indexOf(“euCookie”) < 0 && !euCookieSet ) {
    if (!isCookiePage) {
    euCookieConsent();
    }
    }
    } // new
    });

    Of course feel free to change the “10” with any other pixel amount. It seems that Avada/sticky menu does a “virtual” scroll of 1 pixel just after page load. This fix forces a minimum of 10.

The topic ‘Avada incompatibility (scroll) – SOLVED’ is closed to new replies.