I’m getting an error in jQuery core when I try the following code in IE8;
$("input:focus").addClass("focused").animate(
{outlineWidth:"4px",outlineColor:"#8bc0e8"},200);
I have tested the code on other PC’s with the exact same version of IE, same OS (Windows 7), but rather confusingly the error only occurs on certain PC’s and not others.
Has anyone experienced problems using outline in jQuery?
I’ve separated into single properties, e.g. outlineWidth and outlineColor etc, but get the same error.
Whenever I see “IE8” and “it works on one PC but not on another, with identical OS and IE version”, my first thought is that one of them is probably rendering it in IE7-combatibility mode.
To find out if this is the case, open IE’s Developer Tools window — it shows the rendering mode at the top right.
This would also make sense, since IE8 does support the
outlinestyle, whereas IE7 doesn’t. If IE8 is in compatibity mode, it won’t support it.