JSFiddle - React, Tailwind, and code Playground
HTML
<div class="div">
<button id="button">
Find Height
</button>
</div>
CSS
.div {
width:300px;
height:1000px;
background-color:yellow;
}
JavaScript
$("#button").click(function() {
alert( "Viewport Height: " + $(window).height() + " Height of div: " + $(".div").height() );
});