JSFiddle - React, Tailwind, and code Playground
HTML
<div id = "othdiv">
If you scroll past me, then you'll see the other div.
</div>
<div id = "dvid">
Oh hello! :D
</div>
CSS
body {
height: 800px;
font-family: 'Arial', Helvetica, Sans-Serif;
color: white;
font-weight: bold;
}
#othdiv {
height: 50px;
background-color: rgb(0, 140, 200); /*just wanted this to be pretty :)*/
position: absolute;
top: 200px;
left: 0px;
}
#dvid {
background-color: rgb(34, 177, 76);
height: 50px;
position: absolute;
top: 260px;
left: 100px;
}
JavaScript
$(document).ready(function() {
$("#dvid").hide(); //hide your div initially
var topOfOthDiv = $("#othdiv").offset().top;
$(window).scroll(function() {
if($(window).scrollTop() > topOfOthDiv) { //scrolled past the other div?
$("#dvid").show(200); //reached the desired point -- show div
}
});
});