JSFiddle - React, Tailwind, and code Playground
HTML
<div class="frame">
<p>some text some text some text some text</p>
</div>
CSS
.frame {
width:120px;
display:none
}
JavaScript
alert($('div').removeClass('frame').css('visibility','hidden').find('p').height());
$('div').addClass('frame').css('visibility','visible');