<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Beyond Coding &#187; Internet Explorer</title>
	<atom:link href="http://www.beyondcoding.com/category/browsers/internet-explorer-browsers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.beyondcoding.com</link>
	<description>Follow us on Twitter: @fredwu and @scotti3g</description>
	<lastBuildDate>Thu, 15 Jul 2010 13:58:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>jQuery.slideDown() issues in IE: quick fixes</title>
		<link>http://www.beyondcoding.com/2009/02/26/jquery-slidedown-issues-in-ie-quick-fixes/</link>
		<comments>http://www.beyondcoding.com/2009/02/26/jquery-slidedown-issues-in-ie-quick-fixes/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 02:41:34 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[slideDown]]></category>

		<guid isPermaLink="false">http://www.beyondcoding.com/?p=249</guid>
		<description><![CDATA[A simple Google search suggests that people are having problems with jQuery.slideDown() on Internet Explorer. I&#8217;ve come across two issues on Internet Explorer 7 while developing a website containing some slideDown() effects, and found some quick fixes for them. :) Issue 1: slideDown() does not actually slide, the target HTML element appears the same way [...]]]></description>
			<content:encoded><![CDATA[<p>A simple Google search suggests that people are <a href="http://nick.blogster.com/jquery-slidedown-effect-ie-bug">having problems</a> with jQuery.slideDown() on Internet Explorer.</p>
<p>I&#8217;ve come across two issues on Internet Explorer 7 while developing a website containing some <em>slideDown()</em> effects, and found some quick fixes for them. :)</p>
<p><span id="more-249"></span></p>
<p><strong>Issue 1: <em>slideDown()</em> does not actually slide, the target HTML element appears the same way as <em>show()</em>.</strong></p>
<p>After messing around with the JavaScript and HTML, I&#8217;ve finally nailed down the issue. It occurs when there are absolutely positioned elements in the target HTML.</p>
<p>Typically when we have absolutely positioned elements, we would want to have a relatively positioned wrapper element to control the position of the elements on the page. It makes perfect sense to simply trigger the <em>slideDown()</em> effect on the wrapper.</p>
<p>The HTML schema would look something like this:</p>
<p>Wrapper A <small>(the element that contains Wrapper B, it makes an AJAX call to retrieve Wrapper B)</small><br />
&#8230;. Wrapper B <small>(the relatively positioned target element that is assigned to the <em>slideDown()</em> event)</small><br />
&#8230;. &#8230;. Element C <small>(absolutely positioned)</small></p>
<p>Both Firefox and Safari don&#8217;t have any problems with that, but Internet Explorer does. On IE 7 (I haven&#8217;t tested IE 6), the targeted HTML (Wrapper B) will simply appear without the sliding effect, resulting the same effect as calling <em>show()</em>.</p>
<p>The fix is simple, make the parent element (Wrapper A) relatively positioned too.</p>
<p><strong>Issue 2: <em>slideDown()</em> animates, then the element vanishes immediately afterwards.</strong></p>
<p>The problematic JavaScript looks something like this:</p>
<pre class="brush: jscript;">
var data = 'Some HTML retrieved from an AJAX call.';
$(&quot;div#wrapper_b&quot;).hide().html(data).slideDown();
</pre>
<p>The fix is quick and simple:</p>
<pre class="brush: jscript;">
var data = 'Some HTML retrieved from an AJAX call.';
$(&quot;div#wrapper_b&quot;).hide().html(data).slideDown().show(function(){
	$(this).html(data).show();
});
</pre>
<p>Of course, depending on the HTML markup, your mileage may vary.</p>

	Tags: <a href="http://www.beyondcoding.com/tag/fix/" title="fix" rel="tag">fix</a>, <a href="http://www.beyondcoding.com/tag/ie/" title="IE" rel="tag">IE</a>, <a href="http://www.beyondcoding.com/tag/internet-explorer/" title="Internet Explorer" rel="tag">Internet Explorer</a>, <a href="http://www.beyondcoding.com/tag/jquery/" title="jQuery" rel="tag">jQuery</a>, <a href="http://www.beyondcoding.com/tag/slidedown/" title="slideDown" rel="tag">slideDown</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.beyondcoding.com/2008/11/20/jquery-problems-in-ie-it-could-be-swfobjects/" title="jQuery problems in IE? It could be SWFObjects. (November 20, 2008)">jQuery problems in IE? It could be SWFObjects.</a> (3)</li>
	<li><a href="http://www.beyondcoding.com/2009/08/04/release-jquery-plugin-slideshow-lite/" title="Release: [jQuery Plugin] Slideshow Lite (August 4, 2009)">Release: [jQuery Plugin] Slideshow Lite</a> (49)</li>
	<li><a href="http://www.beyondcoding.com/2009/01/15/release-jquery-plugin-endless-scroll/" title="Release: [jQuery Plugin] Endless Scroll (January 15, 2009)">Release: [jQuery Plugin] Endless Scroll</a> (36)</li>
	<li><a href="http://www.beyondcoding.com/2009/08/29/jquery-slideshow-lite-plugin-updated-major-rewrite/" title="jQuery Slideshow Lite Plugin Updated (Major Rewrite) (August 29, 2009)">jQuery Slideshow Lite Plugin Updated (Major Rewrite)</a> (0)</li>
	<li><a href="http://www.beyondcoding.com/2009/04/20/jquery-endless-scroll-updated/" title="jQuery Endless Scroll Updated (April 20, 2009)">jQuery Endless Scroll Updated</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2009/02/26/jquery-slidedown-issues-in-ie-quick-fixes/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
