<?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>Gilluminate &#187; jquery</title>
	<atom:link href="http://www.gilluminate.com/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gilluminate.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 Jun 2010 02:50:57 +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>Using JQuery to reveal using a slide up effect</title>
		<link>http://www.gilluminate.com/2009/09/09/using-jquery-to-reveal-using-a-slide-up-effect/</link>
		<comments>http://www.gilluminate.com/2009/09/09/using-jquery-to-reveal-using-a-slide-up-effect/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 05:35:46 +0000</pubDate>
		<dc:creator>Jason Gill</dc:creator>
				<category><![CDATA[Developer Blog]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.gilluminate.com/?p=5519</guid>
		<description><![CDATA[The slideUp() method in JQuery is intended to hide the element rather than reveal it. It is basically the opposite of slideDown() which &#8220;unhides&#8221; your element by sliding it down. As you can see on this blog, I have an &#8220;About Jason Gill&#8221; tab in my heading. When clicked, this tab reveals information about who [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://docs.jquery.com/Effects/slideUp">slideUp()</a> method in <a href="http://jquery.com/">JQuery</a> is intended to hide the element rather than reveal it. It is basically the opposite of <a href="http://docs.jquery.com/Effects/slideDown">slideDown()</a> which &#8220;unhides&#8221; your element by sliding it down.</p>
<p>As you can see on this blog, I have an &#8220;About Jason Gill&#8221; tab in my heading. When clicked, this tab reveals information about who I am by sliding upward. In figuring out how to do this, I of course consulted the Google gods and came up with a lot of people asking how, but few people providing answers. So, I&#8217;ve decided to post the solution I finally came up with hoping it will benefit others.</p>
<p>Basically, I am using two different effects to create what looks like one effect. What you are seeing is essentially a slideDown() in conjunction with an <a href="http://docs.jquery.com/Effects/animate">animate()</a> effect. The animate() is literally moving the info box upward at the same speed it is sliding down (in my case, &#8220;slow&#8221;).  I just had to measure the height of the #about_me box and animate it upward exactly that many pixels (in my case it was 171 pixels). To close the box, I simply animate downward at the same rate I slideUp. Technically, I&#8217;m using animate in conjunction with <a href="http://docs.jquery.com/Effects/slideToggle">slideToggle()</a>, but you get the idea.</p>
<p>You can take a look at my source, but I&#8217;ll post the javascript here for your convenience:</p>

<div class="wp_codebox"><table><tr id="p55192"><td class="code" id="p5519code2"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> opened <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#about_tab&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>opened<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#about_me&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;top&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;+=171px&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#about_me&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;top&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;-=171px&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#about_content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideToggle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#about_tab .close&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		opened <span style="color: #339933;">=</span> opened <span style="color: #339933;">?</span> <span style="color: #003366; font-weight: bold;">false</span> <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.gilluminate.com/2009/09/09/using-jquery-to-reveal-using-a-slide-up-effect/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
