Error in Internet Explorer 9 (not earlier versions or other browsers) when including jQuery in an iframe

Viewed 10340

Basically I have a page that launched a fancybox iframe. In that iframe I also include jQuery. But when I testing it in Internet Explorer 9 it gives me the error

Line: 68\n Error: 'Object' is undefined`

This error is in file jquery-1.4.1.js and the line in question is the second line of this:

// Save a reference to some core methods
toString = Object.prototype.toString,
hasOwnProperty = Object.prototype.hasOwnProperty,
push = Array.prototype.push,
slice = Array.prototype.slice,
indexOf = Array.prototype.indexOf;

which is the last lines of the var jQuery = function( selector, context ) {.

No problem if I'm in compatibility view, no problem in any other browsers, just Internet Explorer 9 in Internet Explorer 9 mode and Internet Explorer 9 standards. If I ignore the error I see no problems using any version of jQuery.

What's up, and what I can do to fix?

4 Answers
Related