• Closed
  • Abigail Meyers
    Spectator
    14.07.2015 at 00:50 #18872

    It looks like there is a bug on Evolve+. The sticky menu starts to exist when a user is scrolling down. However, when the user moves up, there can be duplicate menus from the main navigation and the sticky slider. This looks very weird and like it is a bug. I know that I can remove the sticky slider, but I was wondering if there was some sort of fix for this duplicate menu. I would like to use the sticky slider, but I hate that bug.

    Denzel Chia
    Moderator
    Posts: 2656
    14.07.2015 at 07:12 #18877

    Hi,

    In evolve-plus/library/functions/basic-function.php at line 940, Find the following block of codes.
    <script type="text/javascript">
    //
    //
    //
    // Sticky Header
    //
    //
    //

    jQuery(document).ready(function($) {
    if(jQuery('.sticky-header').length >= 1) {
    jQuery(window).scroll(function() {
    var header = jQuery(document).scrollTop();
    var headerHeight = jQuery('.menu-header').height();

    if(header > headerHeight) {
    jQuery('.sticky-header').addClass('sticky');
    jQuery('.sticky-header').fadeIn();
    } else {
    jQuery('.sticky-header').removeClass('sticky');
    jQuery('.sticky-header').hide();
    }
    });
    }
    });
    </script>

    Replace it with the following block of codes.

    <script type="text/javascript">
    //
    //
    //
    // Sticky Header
    //
    //
    //

    jQuery(document).ready(function($) {
    if(jQuery('.sticky-header').length >= 1) {
    jQuery(window).scroll(function() {
    var header = jQuery(document).scrollTop();
    //mod by denzel add height of .header, this will ensure sticky menu is deployed after menu.
    var headerHeight = jQuery('.menu-header').height()+jQuery('.header').height();

    if(header > headerHeight) {
    jQuery('.sticky-header').addClass('sticky');
    jQuery('.sticky-header').fadeIn();
    } else {
    jQuery('.sticky-header').removeClass('sticky');
    jQuery('.sticky-header').hide();
    }
    });
    }
    });
    </script>

    This will fix the bug. Please clear your browser cache and revisit your website to see the changes. Clear your server or plugin cache if you have them installed. You may need to reload a few times if you have persistence cache plugins or server cache.

    Thanks!
    Denzel