Depending on IE version / quirks mode, either:
$(document).ready(function () {
$('#test').css('height', $(window).innerHeight());
});
or
$(document).ready(function () {
$('#test').css('height', document.body.clientHeight);
});
will work. You can do the same with widths as well.
$(window).innerWidth();
document.documentElement.clientWidth;
Using your code & my code in IE 9 worked good for me. Since it apparently didn't work for you, my only other suggestion is to ensure there are no other borders/margins/paddings that could be interfering.
<html>
<head>
<title>hi</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<style type="text/css">
body{ margin:0; padding:0; }
#test{ width:100%; height:100%; background-color:red; }
</style>
</head>
<body>
<div id="test">
</div>
<script type="text/javascript">
$(document).ready(function () {
$('#test').css('height', $(window).innerHeight());
});
</script>
</body>
</html>