[resolved] unstick sticky menu while mobile nav is opened (4 posts)

  1. muzli
    Posted 2 years ago #

    Hi there!

    Is it possible to make the sticky menu unsticked while the mobile nav is opened?

    Thanks for any help!

    p.s.: I made the menu sticky this way.

    (my site is: muzli.hostoi.com)

  2. nikola00219
    Posted 2 years ago #

    Well this was easy to solve. You have to change the way you load sticky function in global.js to looks like this:

    // Sticky Menu
    	if ($(window).width() > 800) {
    	    $(".navigation").sticky({ topSpacing: 0 });

    I like the way you use up-to-the-top in your menu. I was able to put it in mine, but how did you make it disappear when you are at the top of the page?

  3. muzli
    Posted 2 years ago #

    Well unfortunately this won't solve my problem fully. In this case the sticky menu will be disabled at all if the user views it with mobile. However I would like to disable it only if the mobile menu is in opened position.

    Answer to your question:
    It is connected with the sticky menu. In default the up-to-the-top class isn't displayed and then I used the .is-sticky .up-to-the-top selector to set the display value to block. Hope it helps you out! :)

    Also waiting for better solution for my original question.

  4. nikola00219
    Posted 2 years ago #

    Thanks for your explanation. I already found the answer few hours after my post but I am new to wordpress.org and didn't know I couldn't edit my comment after some time.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic