Okay
  Public Ticket #991168
main menu
Closed

Comments

  •  2
    Toby started the conversation

    I'm looking to put the main menu *below* the main site hook image above the fold but then also have that menu become sticky.  Is this possible?

    Also, separately, is possible to control how far down you scroll before the overlapping menu becomes the sticky menu.  Would like for it to scroll down much farther before converting.

    -Toby

  •  34
    Kris replied

    I'm not sure if I right understand. Did you wish something like this?

    Kris

    DynamicPress Support Team

  •  2
    Toby replied

    Yes.  In a way.  I think in the end we'd change the styling but the idea is the same.  And then when you scroll down to that point it would become sticky and stay at the top of the screen.  

  •  34
    Kris replied

    This is imposible without small code changes. I try do it on weeknd inchild theme for you.

    Kris

    DynamicPress Support Team

  •  2
    Toby replied

    What about the other question.  Can i control how far down i scroll before the overlapping menu goes sticky?

  •  34
    Kris replied

    This in JS Code.

    Exactly in wp-content/themes/igora/js/common_scripts.js about line 2853 you have:

        // Sticky header scroll
        jQuery(window).scroll(function() {
            if(typeof $DP_STICKY_HEADER != 'undefined') {
            if ($DP_STICKY_HEADER == 'Y') { 
            var switchvalue = jQuery('#dp-navigation-wrapper').height();
            if(jQuery(this).scrollTop() >switchvalue && jQuery(window).width()> $DP_TABLET_WIDTH ) {
            jQuery('#dp-navigation-wrapper').addClass('dp-sticky-navigation-wrapper');
            } else {
            jQuery('#dp-navigation-wrapper').removeClass('dp-sticky-navigation-wrapper');
            }
            }
            }
        });
    

    As you see sticky header stay be visible dxactly when #dp-navigation-wrapper is our of screen. Of course when we add something above navigation wrapper in our case subheader area) we must add height of this element in calculation. You can add / subtract to switchvalue any other constans . This way you can control how far down should you scroll the overlapping menu goes sticky

    Kris

    DynamicPress Support Team