JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<div id="content">
<div class='slider'></div>
<div>Content 1 Test<br/>Test<br/>Test<br/>Test<br/>Test<br/>Test</div>
<div>Content 2<br/>Test<br/>Test<br/>Test<br/>Test<br/>Test<br/>Test</div>
</div>
</body>
</html>
CSS
#content div { width: 200px; z-index: 2; }
#content div.slider { position: absolute; background: #99AABB; z-index: -1; }
JavaScript
$(function(){
$("#content div:not(.slider)").click(function() {
$(".slider").animate({ top: $(this).offset().top, height: $(this).height() });
});
});