jQuery – Show and hide Div on scroll

If you have a div that sits at the bottom of a slideshow that you want to disappear when the user scrolls down, and then reappears when scrolls back to the top, you can follow the below example.

  <div class="a">

$(window).scroll(function() {
  if ($(this).scrollTop() > 0) {
  } else {


Hope it is useful for someone 🙂


No comments yet.

Leave a Reply