When a user is at the top of a page, the div is shown. When they scroll down the page, the div is hidden until they reach the bottom of the page, whereby the div is shown again. The div would be a fixed navigation menu
Below is some code posted by another member, which successfully shows the div at the bottom of the page, but always hides it at the top.
Original post can be found here: How to show div when user reach bottom of the page?
Thanks!
<script>
$(document).ready(function() {
$(window).scroll(function() {
if ($("body").height() <= ($(window).height() + $(window).scrollTop())) {
$("#hi").css("display","block");
}else {
$("#hi").css("display","none");
}
});
});
</script>
The below should work for you:
Edited to use
fadeIn()
andfadeOut()
Additional options for fading available here
Try this :