I have a page with jquery on it. It works fine in Firefox, Chrome etc but if I load it in IE, none of the Jquery functions run, and IE’s script debugger shows:
Error
A Runtime Error has occurred.
Do you wish to Debug?
Line: 269
Error: Unterminated string constant
Yes No
The line in question is in my (unmodified) jquery.js that is causing the error is
style.left = ret || 0;
It also shows:
Error
A Runtime Error has occurred.
Do you wish to Debug?
Line: 835
Error: Invalid argument.
Yes No
With the line in question being:
ret = style.pixelLeft + “px”;
Any ideas?
EDIT:
Seems I may have been looking in the wrong place for the error. If I take this out, it works:
$(".middlebox").children("p").hide();
$(".middlebox").addClass("middlebox_closed", "fast");
The error is not necessarily in the jQuery code, but the argument value being passed as a parameter into a function in jQuery i.e. the step before.
EDIT:
This line is incorrect
addClass()does not take 2 arguments, just one which is a string for the class that you wish to add. Change it toand it will work. Or maybe you wanted to add 2 classes, in which case this will work too