JSFiddle - React, Tailwind, and code Playground
HTML
<div id="yourDiv">
</div>
CSS
#yourDiv {
height: 500px;
width: 500px;
margin: 20px auto;
border: 1px dotted #CCC;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
JavaScript
'use strict';
$(document).ready(function(){
var buffer = $('#yourDiv').css('height');
setInterval(function(){
var height = $('#yourDiv').css('height');
if (height != buffer) {
$('#yourDiv').html('The height changed from ' + height + ' to ' + buffer);
buffer = $('#yourDiv').css('height');
}
}, 100);
$('#yourDiv').click(function(){
var a = Math.random(1) + 0.1;
$(this).css('height', (a * 501) + 'px');
});
});