JSFiddle - React, Tailwind, and code Playground

by Neal

HTML

<script type="text/javascript">
        function ChangeSize (){
            var blueDiv = document.getElementById ("blueDiv");
            blueDiv.style.width = "200px";;
            blueDiv.style.height = "100px";;
        }

        function OnResize (blueDiv) {
            var w = blueDiv.offsetWidth;
            var h = blueDiv.offsetHeight;
            alert ("The size of the blue element will change to " + w + " * " + h);
        }
    </script>

<div  onresize="OnResize (this);">hi there</div>

CSS

div {
    overflow: auto;
    resize: both;
    background: grey; 
    color: blue;
    height: 50px;
    width: 50px;
}

JavaScript

$('div').height(100)