Support » Plugin: Elementor Page Builder » Menu hide on scroll

  • Resolved filippenta

    (@filippenta)


    Hey! I’m new to elementor pro and i’ve starting to use this sticky effect for my navbar. But is there a way to make it hide on scrolldown and appear on scrollup? A plugin? Extended code? Let me know 😀

Viewing 2 replies - 1 through 2 (of 2 total)
  • anderson456

    (@anderson456)

    Don’t know about Pro.
    This is a jquery javascript code:

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
      
    </head>
      
    <body style="height: 2000px">
    <div id="somediv" style="color:white;background-color: blue;width: 200px;height:30px;position: fixed;left: 100px;top: 1px;text-align:center;">
    bar
    </div>
      
    <script>
    $(document).ready(function(){
      var min_height = 100;
      var lastpos=0;
      $(window).scroll(function(){
        var s =$(window).scrollTop();
        if(s-lastpos > min_height){
        $("#somediv").hide();
          lastpos=s;
        }
        else if(lastpos-s > min_height){
        $("#somediv").show();
          lastpos=s;
        }
      });
      
    })
    </script>
    </body>
    </html>

    Don’t ask me about it, newbie too.

    Plugin Support Lisa R

    (@lisaelementor)

    Hi @filippenta
    Elementor Pro users receive premium support.
    Please reach out to our support team!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Menu hide on scroll’ is closed to new replies.