JSFiddle - React, Tailwind, and code Playground

by Max Doe

HTML

<div class="bottomMenu">
Lorem ipsum dolor sit amet.
</div>

CSS

* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  height: 1600px;
}

.bottomMenu {
  display: none;
  position: fixed;
  bottom: top;
  width: 100%;
  height: 60px;
  border-top: 1px solid #000;
  background: red;
  z-index: 1;
  text-align: center;
  color: #ccc;
  line-height: 60px;
}

JavaScript

$(document).scroll(function() {
  var y = $(this).scrollTop();
  if (y > 300) {
    $('.bottomMenu').slideDown(100);
  } else {
    $('.bottomMenu').slideUp(100);
  }

});