I have a simple function that works in chrome, but in Internet explorer (9) it crashes:
function go() {
var selector = "span";
console.log($);
answer = $(selector); // errors on this line.
return answer;
}
Which outputs:
LOG: function(a,b){return new e.fn.init(a,b,h)}
SCRIPT438: Object doesn't support this property or method
So it appears that jQuery is there, and if i run $("span") on the IE console it works. So i’m baffled. Has anyone experienced this problem before?
IE offers a
console.logfunction only when the debugger is open. Remove theconsole.log($);and it should work.Or you could patch it like this :