JSFiddle - React, Tailwind, and code Playground
by doctor23
HTML
<div id=block1 style="height:100px;"></div>
<br/><br/>
<div id=block2></div>
<br/><br/>
<input type=button id="btn" value="Click me"/>
CSS
div{border:1px solid black;}
JavaScript
$( "#block1" ).resize(function() {
$( "block2" ).height($( "block1" ).height());
});
var h = 99;
$( "#btn" ).click(function() {
a=100-h;
$( "#block1" ).height(a);
});