Jquery cod in IE

Jquery cod in IE

Hi to all.
Im not a guru in programming.
I have problems running jquery in IE.

I tested the code in FF, Opera, Chrome and it function very well.

This is the code:
$(function(){
$(window).resize(function(){
$('#wrap').css("height", innerHeight);
var inalt = innerHeight -80;
$('iframe').css("height", inalt);
console.log(inalt);
});
$('#wrap').css("height", innerHeight);
var inalt = innerHeight - 80;
$('iframe').css("height", inalt);
});

The scope of this code is to set the correct height of an iframe i use for external site. I have done in these mood because the header has 80px. I gues this is not important. I want to know what is the problem with IE(all of them) and how can I resolve it.
Thanks.