JSFiddle - React, Tailwind, and code Playground

by darxide

HTML

<div class="outer">
    <div class="inner"></div>
</div>

<div class='info'>a</div>
<div class='info2'></div>

CSS

.outer {
    width: 200px;
    height:200px;
    overflow-y: scroll; 
    border: 1px solid #666;
    border-radius: 4px;
}

.inner {
    width: 180px;
    height: 600px;
    background-color: #eee;
}

JavaScript

$(window).on('scroll' , function() {
	var h = $('.inner').height()
    $('.info').text(h)
})