How can I call a Javascript from a local .js file when the window is resized?
Here is the code in my .js file, which may or may not work because I can't figure out how to call it, but that's besides the point...
function sizeGutter()
{
var p = document.getElementById("MIIHomeBtn");
var offset = p.offsetTop + p.offsetHeight;
document.getElementById("gutterDiv").style.top = offset + "px";
document.getElementById("gutterDiv").style.height = document.getElementById("gutterDiv").offsetHeight - offset + "px";
}
And then I want to put
window.onresize = sizeGutter;
into my html, but I'm not really sure how, or if that is even the right approach.
Please help.