Reputation: 16502
I have a page with the doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
and I am trying to run a jQuery animation on the page testing with IE8. The animation does not work, and doesnt even attempt to animate even though the "animate complete" callback is fired.
If I change the doctype to:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
The animation works perfect. Is that added URL necessary or required?
Edit: I should add, I do not have control over the HTML of the original page. I just threw this doctype in to a test page to see if that was the issue.
Upvotes: 1
Views: 111
Reputation: 268324
The URL you're referring to points to the definition your document uses; there are a few options.
It's likely you're experiencing issues between Quirks Mode (which makes IE8 behave like IE5.5), and Standards Mode. If you press F12 you should be able to identify which Document Mode you're in via the developer tools.
There are a few ways to put the browser back into standards mode:
x-ua-compatible
header with a value of IE=edge
in the HTTP response.<!DOCTYPE html>
doctypemeta
tag to provide the x-ua-compatible
instructionAside from these, if you cannot modify the markup, you will not be able to force the page into Standards. You can, of course, experience with Standards Mode by manually overriding the Document Mode in the developer tools; this won't affect any other users though.
Additional Reading:
Upvotes: 3