{"id":1242,"date":"2010-10-29T09:41:50","date_gmt":"2010-10-29T08:41:50","guid":{"rendered":"http:\/\/www.simonbattersby.com\/blog\/?p=1242"},"modified":"2010-10-29T13:31:28","modified_gmt":"2010-10-29T12:31:28","slug":"jquery-fadein-and-fadeout-problems-with-ie8","status":"publish","type":"post","link":"https:\/\/www.simonbattersby.com\/blog\/2010\/10\/jquery-fadein-and-fadeout-problems-with-ie8\/","title":{"rendered":"jQuery fadeIn and fadeOut problems with IE8"},"content":{"rendered":"<p>I&#8217;ve just written a jQuery plugin to allow a user to simply configure some dropdown menu animations. It tests fine in IE6 and IE7, but the fadeIn\/fadeOut didn&#8217;t work in IE8. Unbelievable. It astonishes me the things that fail in IE8 but were fine in IE7.<\/p>\r\n\r\n<p>The specific instance here was fading a drop down ul element, which was positioned absolutely with respect to an li element with position:relative. You know, standard stuff. Turns out IE8, position:relative and fade don&#8217;t play nicely. The solution in the end turned out to be applying:<\/p>\r\n\r\n<pre>filter:inherit<\/pre> \r\n\r\n<p>to <strong>the li element<\/strong>. Applying this to the ul has no effect. This doesn&#8217;t seem to cause any issues with IE6 or IE7, fortunately.<\/p>\r\n\r\n<p>I also found that in IE8 as the fadeIn completes, the faded text appears to jump a pixel to the left. This isn&#8217;t tragic, but it&#8217;s a bit irritating. I found that this only happened if I used the fadeIn method. If I fade in by using .animate() to change the opacity, then the jump goes away. <\/p>\r\n\r\n<p>You can see the final result <a href=\"\/demos\/menuplugin_demo.htm\" title=\"jQuery menu plugin demo\">here<\/a> if you&#8217;re interested.<\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve just written a jQuery plugin to allow a user to simply configure some dropdown menu animations. It tests fine in IE6 and IE7, but the fadeIn\/fadeOut didn&#8217;t work in IE8. Unbelievable. It astonishes me the things that fail in IE8 but were fine in IE7. The specific instance here was fading a drop down [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[21,20],"class_list":["post-1242","post","type-post","status-publish","format-standard","hentry","category-web-design-and-build","tag-ie8","tag-jquery"],"_links":{"self":[{"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/posts\/1242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/comments?post=1242"}],"version-history":[{"count":0,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/posts\/1242\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/media?parent=1242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/categories?post=1242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/tags?post=1242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}