jQuery - scroll to hide and show element

0 votes
244 views
added Dec 18, 2019 in jQuery by lcjr First Warrant Officer (11,850 points)
(function($){
    $(document).ready(function() {
      var scrolldownToView = $('.scrolldown-to-view');
      $(window).scroll(function() { 
          if (window.scrollY > 1) {
            scrolldownToView.fadeOut(400);
          } else {
            scrolldownToView.fadeIn(400);
          }
      });
         
    });
  })(jQuery);

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...