I have a div that sits at the bottom of a slideshow that I want to disappear when the user scrolls or uses down arrow then reappears when scrolls back to the top. I am guessing this is incorporating the jquery scroll functionality?
scrollEnd(function(){ $('. main'). fadeIn(); }, 700);
First wrap whatever your text or content that you want to show on scroll, in one div so that you can show hide the div depending upon the scroll. Write two classes for your target div. Hope it will solve your problem.
<div>
<div class="a">
A
</div>
</div>
$(window).scroll(function() {
if ($(this).scrollTop() > 0) {
$('.a').fadeOut();
} else {
$('.a').fadeIn();
}
});
Sample
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With