JSFiddle - React, Tailwind, and code Playground
HTML
<div class="holder">
<div>DIVISION</div>
<div>DIVISION</div>
<div>DIVISION</div>
<div>DIVISION</div>
<div>DIVISION</div>
<div>DIVISION</div>
<div>DIVISION</div>
</div>
<br />
<input type="button" onclick="test();" value="CHECK" />
CSS
.holder{
max-height:40px;
background:red;
padding:10px;
overflow:hidden;
}
.holder div{
background:blue;
margin:3px 0;
}
JavaScript
function test(){
var hldr=$('.holder'); //get element
alert('before set: ' + $('.holder').css('maxHeight')); //alert before set
/* SET */
hldr.css('height','auto');
alert('after set: ' + $('.holder').css('maxHeight'));//alert after set
}