Traversing the <title> element and accessing the content.

Traversing the <title> element and accessing the content.


Hi,
There seems to be a problem with using $('title').text() in IE7 and
IE8 - wondering if this is a known problem and if there are any work
arounds.
sample code:
<html>
<head>
    <title>Example</title>
    <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $('#test').val($('title').text());
        });
    </script>
</head>
<body>
<input type="text" id="test" />
</body>
</html>
It works fine within Chrome and Firefox.