I don’t know what i am doing wrong but my onresize works fine in firefox but is not working in IE.
$(window).bind('resize', function () {resize1()});
window.onresize= function(){resize1()};
body.onresize= function(){resize1()};
$(window).resize(function(){resize1()});
I have tried all four of these and all works fine in ff but none of them work in IE. What am i doing wrong.
My resize1 function looks like this:
function resize1(){
var w = $(window).height();
var h = $('.header').height();
var ht = (w-h);
document.getElementById('div').style.height=ht +"px";
}
My ultimate goal is to have the div resize when someone resizes the window by dragging a corner. Again works fine in FF but not working in IE. Thanks for your help.
When i call the function using “onload” it works fine it just doesn’t fire when using the onresize event. So when i load the page the div is the correct size but then when i resize it doesn’t fire the function again. So it seems to be something with the event oneresize not being recognized by IE. ??
1 Answer