Why is my footer not fading in after 1000px like I want it to? Instead, it appears immediately on the screen. I attempted using fadeIn() in jQuery but had no luck. I also tried to make it disappear with fadeOut(), again with no success. Am I missing something here?
Thank you!
//function to show the footer after a certain pixel value
jQuery(function($){
$(document).scroll(function () {
var y = $(this).scrollTop();
if (y > 1000) {
$('footer').show().fadeIn("slow");
} else {
$('footer').hide().fadeOut();
}
});
});
<!--Footer-->
<div id="ft" class="page-wrap">
<main>
<section>
</section>
</main>
<footer>
<small>
- Footer -
<p>Content Lorem ipsum dolor</p>
<p>lorem ipsum</p>
</small>
</footer>
</div>