JSFiddle - React, Tailwind, and code Playground
HTML
<div id="Wrap">
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>
</div>
CSS
* {
margin: 0;
padding: 0;
}
#Wrap {
max-height: 32px;
background: #ccc;
overflow: hidden;
}
#wrap ul li {
line-height: 16px;
}
JavaScript
$(function(){
Wrap = $('#Wrap');
Wrap.on('click', function () {
console.log('Wrap height: ' + $(this).height());
console.log('List height: ' + $(this).find('ul').height());
});
});