There is a new CSS property, called resize, so the divs are resizeable too. But how to attach an event listener? Because .onresize
works only on the window object
JSFiddle: http://jsfiddle.net/3y0gfj8j/
Edit:
I don't want to use JQuery. It's not a duplicate question. I've found only JQuery solutions for this problem, that's why I asked this question.
I worked around it this way. Seems to work OK in Firefox at least. It fires when you take your cursor off the resize 'grabber' on the bottom right of the element you're resizing.
<DOCTYPE=html>
<html>
<script>
function functionname()
{
//replace this line with the script you want executed
}
</script>
<style>
#idname {resize:both;}
</style>
<body>
<div id="idname" onmouseout="functionname();"></div>
</body>
</html>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With