I can't get this to work and am at my wits end. The code will not fire an event!
This is what I have, the math is custom to the page. I need to reset the bodyWrapper height when the window is resized to prevent overflow on top of another div.
<script type="text/javascript">
window.onresize = function() {
var height = window.height();
var wrapper = height - 286;
document.getElementById('bodyWrapper').style.height = wrapper;
};
</script>
<div class="body-wrapper" id="bodyWrapper" style="height: 50px;">