W
W
Warlynn2019-11-25 18:10:00
JavaScript
Warlynn, 2019-11-25 18:10:00

How to hide drop down menu on scroll?

Good afternoon.
In the mobile version of this site , when you click on the "burger" menu drops out. But how can you hide it on scroll down if it is open without clicking on the burger again? Now implemented like this:

(function ($) {
  $(document).ready(function(){
  $(function () {
    $(window).scroll(function () {
      if ($(this).scrollTop() > 100) {
        $('#dropmenu').fadeOut();
      }
    });
  });
});

When scrolling the menu closes, but then does not open when you click on "burger")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TCloud, 2019-11-26
@OTCloud

This is very easy to google, when using bootstrap, use its functionality.
source

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question