I'm a little confused by the JS onresize
and checked out W3schools for this issue. But that brought me even more questions. So I decided to ask it on Stack.
Why exactly is this not getting triggered by this?
So basically:
HTML
<h1>The resize Property</h1>
<div onresize="test()">
<p>Let the user resize both the height and the width of this div element.</p>
<p>To resize: Click and drag the bottom right corner of this div element.</p>
</div>
<p><b>Note:</b> Internet Explorer does not support the resize property.</p>
CSS
div {
border: 2px solid;
padding: 20px;
width: 300px;
resize: both;
overflow: auto;
}
Javascript
function test() {
alert("Resized");
}
JSFiddle: https://jsfiddle.net/v95yLtxd/
I kind of expected the JS function to be executed on the resizing.
Why is this not working as I expected it to be?