JSFiddle - React, Tailwind, and code Playground
HTML
<div class="bottomMenu">
<!-- content -->
</div>
CSS
body {
height: 2000px; /* simulate content */
}
.bottomMenu {
width: 100%;
height: 60px;
border-top: 1px solid #000;
position: fixed;
bottom: 0px;
z-index: 100px;
opacity: 0;
}
JavaScript
$(document).ready(function() {
$(window).scroll( function(){
$('.bottomMenu').each( function(i){
var bottom_of_object = $(this).position().top + $(this).outerHeight();
var bottom_of_window = $(window).scrollTop() + $(window).height();
if( bottom_of_window > bottom_of_object ){
$(this).animate({'opacity':'1'},500);
}
});
});
});