Uncaught TypeError: Cannot read property 'safari' of undefined
<p>I have this jjavascript to resize iframes:</p>

<pre><code> $(function () {

            var iFrames = $('iframe');

            function iResize() {

                for (var i = 0, j = iFrames.length; i &lt; j; i++) {
                    iFrames[i].style.height = iFrames[i].contentWindow.document.body.offsetHeight + 'px';
                }
            }

            if ($.browser.safari || $.browser.opera) {

                iFrames.load(function () {
                    setTimeout(iResize, 0);
                });

                for (var i = 0, j = iFrames.length; i &lt; j; i++) {
                    var iSource = iFrames[i].src;
                    iFrames[i].src = '';
                    iFrames[i].src = iSource;
                }

            } else {
                iFrames.load(function () {
                    this.style.height = this.contentWindow.document.body.offsetHeight + 'px';
                });
            }

        });
</code></pre>

<p>In chrome, it has trouble here:</p>

<pre><code> if ($.browser.safari || $.browser.opera) {
</code></pre>

<p>Is there any reason why I get this error? I am using the latest JQuery?</p>

<p>Thanks</p>
