<?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>Design-Notes &#187; jQuery</title>
	<atom:link href="http://design-notes.info/topics/tutorial/jquery-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://design-notes.info</link>
	<description>Design-Notes</description>
	<lastBuildDate>Wed, 23 Jun 2010 16:08:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using jQuery to Parse XML data</title>
		<link>http://design-notes.info/tutorial/using-jquery-to-parse-xml-data/</link>
		<comments>http://design-notes.info/tutorial/using-jquery-to-parse-xml-data/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 20:53:48 +0000</pubDate>
		<dc:creator>alexandra</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://design-notes.info/?p=2733</guid>
		<description><![CDATA[I love jQuery. It made things so much easier. if you still don&#8217;t much know it, you can read about more amazing features on their official jQuery site. Also there is a easy way to parse XML data with jQuery and here it is.
First, Include jQuery
The best way to include jQuery these days is using [...]]]></description>
			<content:encoded><![CDATA[<p>I love jQuery. It made things so much easier. if you still don&#8217;t much know it, you can read about more amazing features on their official <a href="http://jquery.com/">jQuery</a> site. Also there is a easy way to parse XML data with jQuery and here it is.</p>
<h2>First, Include jQuery</h2>
<p>The best way to include jQuery these days is using <a href="http://code.google.com/apis/ajaxlibs/documentation/">google Ajax Library</a><br />
URL for jQuery is here:<br />
<code>http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js</code></p>
<h2>Load  XML with jQuery</h2>
<p>My xml file is test.xml which I got from <a href="http://www.w3schools.com/xsl/xsl_server.asp">W3C XML tutorial</a></p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">$.ajax({ type: &quot;GET&quot;,
    url: &quot;test.xml&quot;,
    dataType: &quot;xml&quot;,
    success: parseXml
  });</pre></div></div>

<p>XML file:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;ISO-8859-1&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;catalog<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Empire Burlesque<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Bob Dylan<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;country<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>USA<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/country<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;company<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Columbia<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/company<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;price<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>10.90<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/price<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;year<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1985<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/year<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/cd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/catalog<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h2>A Function to Parse XML</h2>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">function parseXml(xml)
{
  //find every Tutorial and print the author
  $(xml).find(&quot;cd&quot;).each(function()
  {
   $(&quot;#tiles&quot;).append(&quot;: &quot; + $(this).find(&quot;title&quot;).text() + &quot;&lt;br /&gt;&quot;);
  });
&nbsp;
}</pre></div></div>




ADD TO<a href="#" onclick="javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();"><img src="http://img44.imageshack.us/img44/3714/picture4p.png" alt="Add To Evernote" /></a>  If this helps, why not tell your friends?


	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fusing-jquery-to-parse-xml-data%2F&amp;title=Using%20jQuery%20to%20Parse%20XML%20data" title="Reddit"><img src="http://design-notes.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fusing-jquery-to-parse-xml-data%2F&amp;title=Using%20jQuery%20to%20Parse%20XML%20data&amp;notes=I%20love%20jQuery.%20It%20made%20things%20so%20much%20easier.%20if%20you%20still%20don%27t%20much%20know%20it%2C%20you%20can%20read%20about%20more%20amazing%20features%20on%20their%20official%20jQuery%20site.%20Also%20there%20is%20a%20easy%20way%20to%20parse%20XML%20data%20with%20jQuery%20and%20here%20it%20is.%0D%0AFirst%2C%20Include%20jQuery%0D%0AThe%20" title="del.icio.us"><img src="http://design-notes.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fusing-jquery-to-parse-xml-data%2F&amp;title=Using%20jQuery%20to%20Parse%20XML%20data" title="StumbleUpon"><img src="http://design-notes.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fusing-jquery-to-parse-xml-data%2F&amp;t=Using%20jQuery%20to%20Parse%20XML%20data" title="Facebook"><img src="http://design-notes.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fusing-jquery-to-parse-xml-data%2F" title="Technorati"><img src="http://design-notes.info/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.designfloat.com/submit.php?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fusing-jquery-to-parse-xml-data%2F&amp;title=Using%20jQuery%20to%20Parse%20XML%20data" title="Design Float"><img src="http://design-notes.info/wp-content/plugins/sociable/images/designfloat.png" title="Design Float" alt="Design Float" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fusing-jquery-to-parse-xml-data%2F" title="Identi.ca"><img src="http://design-notes.info/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.friendfeed.com/share?title=Using%20jQuery%20to%20Parse%20XML%20data&amp;link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fusing-jquery-to-parse-xml-data%2F" title="FriendFeed"><img src="http://design-notes.info/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fusing-jquery-to-parse-xml-data%2F&amp;submitHeadline=Using%20jQuery%20to%20Parse%20XML%20data&amp;submitSummary=I%20love%20jQuery.%20It%20made%20things%20so%20much%20easier.%20if%20you%20still%20don%27t%20much%20know%20it%2C%20you%20can%20read%20about%20more%20amazing%20features%20on%20their%20official%20jQuery%20site.%20Also%20there%20is%20a%20easy%20way%20to%20parse%20XML%20data%20with%20jQuery%20and%20here%20it%20is.%0D%0AFirst%2C%20Include%20jQuery%0D%0AThe%20&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://design-notes.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fusing-jquery-to-parse-xml-data%2F&amp;title=Using%20jQuery%20to%20Parse%20XML%20data&amp;body=I%20love%20jQuery.%20It%20made%20things%20so%20much%20easier.%20if%20you%20still%20don%27t%20much%20know%20it%2C%20you%20can%20read%20about%20more%20amazing%20features%20on%20their%20official%20jQuery%20site.%20Also%20there%20is%20a%20easy%20way%20to%20parse%20XML%20data%20with%20jQuery%20and%20here%20it%20is.%0D%0AFirst%2C%20Include%20jQuery%0D%0AThe%20" title="Ping.fm"><img src="http://design-notes.info/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://design-notes.info/tutorial/using-jquery-to-parse-xml-data/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Play with jQuery &#8211; infinite loop and hover sliding effect</title>
		<link>http://design-notes.info/tutorial/jquery-tutorial/play-with-jquery-infinite-loop-and-hover-sliding-effect/</link>
		<comments>http://design-notes.info/tutorial/jquery-tutorial/play-with-jquery-infinite-loop-and-hover-sliding-effect/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 11:33:31 +0000</pubDate>
		<dc:creator>alexandra</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://design-notes.info/?p=2009</guid>
		<description><![CDATA[This is how this &#8220;game&#8221; works. The flashing text says &#8220;LOOK AT ME&#8221;. When you hover just underneath the text it reveals a little cartoon girl. It covers the girl again when you move the mouse away quickly. When you click the &#8220;LOOK AT ME&#8221; text the sliding animation will end. Refresh it if you [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_2020" class="wp-caption alignnone" style="width: 260px"><img class="size-full wp-image-2020" title="Picture 2" src="http://design-notes.info/wp-content/uploads/2009/07/Picture-25.png" alt="Picture 2" width="250" height="223" /><p class="wp-caption-text">Play with jQuery</p></div>
<p>This is how this &#8220;game&#8221; works. The flashing text says &#8220;LOOK AT ME&#8221;. When you hover just underneath the text it reveals a little cartoon girl. It covers the girl again when you move the mouse away quickly. When you click the &#8220;LOOK AT ME&#8221; text the sliding animation will end. Refresh it if you wanna see the animation again.<br />
To see the <a href="http://design-notes.info/demo/jquery.html" target="_blank">Demo</a></p>
<hr />
This is how to do it:</p>
<h2>Simple HTML</h2>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;nav&quot;&gt;
&lt;div id=&quot;girl&quot;&gt;
	&lt;a href=&quot;#&quot;&gt;LOOK AT ME&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</pre></div></div>

<h2>CSS to add background image</h2>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>images/girl-11.png<span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>width<span style="color: #00AA00;">:</span><span style="color: #933;">150px</span><span style="color: #00AA00;">;</span>height<span style="color: #00AA00;">:</span><span style="color: #933;">150px</span><span style="color: #00AA00;">;</span>top<span style="color: #00AA00;">:</span><span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>left<span style="color: #00AA00;">:</span><span style="color: #933;">400px</span><span style="color: #00AA00;">;</span>position<span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#gate</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>background<span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>width<span style="color: #00AA00;">:</span><span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>height<span style="color: #00AA00;">:</span><span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>padding<span style="color: #00AA00;">:</span><span style="color: #933;">50px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#girl</span> a<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>top<span style="color: #00AA00;">:</span><span style="color: #933;">-20px</span><span style="color: #00AA00;">;</span>left<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>color<span style="color: #00AA00;">:</span>pink<span style="color: #00AA00;">;</span>font-weight<span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>font-family<span style="color: #00AA00;">:</span>arial<span style="color: #00AA00;">;</span>text-decoration<span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>font-<span style="color: #000000; font-weight: bold;">size</span><span style="color: #00AA00;">:</span><span style="color: #933;">18px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<h2>Javascript</h2>
<ul>
<li>jQuery Infinite Loop from line 2 to line 9:basically you make a loop start with show end with hide. Put anything you want in between and put this in a runIt function. This is also useful if you wanna do a <strong>warning sign.</strong></li>
<li>Sliding effect from line 10 to line 25:This is very similar to my previous tutorial on <a href="http://design-notes.info/tutorial/jquery-tutorial/make-fancy-light-up-rss-button-with-jquery-fading/">Make fancy light up RSS button with jQuery </a> I changed fadeTo to slideUp and slideDown, inserted line 21 cause it has slide down from a hiding state.</li>
</ul>

<div class="wp_syntax"><div class="code"><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;">function</span> runIt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#girl a&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#girl a&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeTo</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">500</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#girl a&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeTo</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">500</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#girl a&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeTo</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">500</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#girl a&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> runIt<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #009900;">&#125;</span>
		    runIt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</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: #009900;">&#40;</span><span style="color: #3366CC;">'#girl'</span><span style="color: #009900;">&#41;</span>
			    <span style="color: #006600; font-style: italic;">// create our new span.hover and loop through anchor:</span>
			  .<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;span id=&quot;gate&quot; class=&quot;hover&quot;&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</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> $span <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&amp;gt; span.hover'</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'opacity'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			   <span style="color: #006600; font-style: italic;">// when the user hovers in and out</span>
			   $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</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: #006600; font-style: italic;">// on hover</span>
			     $span.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideUp</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			      <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</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: #006600; font-style: italic;">// off hover</span>
			 $span.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$span.<span style="color: #660066;">slideDown</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1500</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>
			    <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>
	 <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;</span></pre></div></div>

<h2>Conclusion</h2>
<p>You are welcome to copy the code and experiment with it. I believe the next web trend will be <strong>&#8220;game like&#8221; interactions </strong>and jQuery is a great framework to do all sorts of fancy effects. Learn more and prepare yourself for the challenge.</p>



ADD TO<a href="#" onclick="javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();"><img src="http://img44.imageshack.us/img44/3714/picture4p.png" alt="Add To Evernote" /></a>  If this helps, why not tell your friends?


	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fplay-with-jquery-infinite-loop-and-hover-sliding-effect%2F&amp;title=Play%20with%20jQuery%20-%20infinite%20loop%20and%20hover%20sliding%20effect" title="Reddit"><img src="http://design-notes.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fplay-with-jquery-infinite-loop-and-hover-sliding-effect%2F&amp;title=Play%20with%20jQuery%20-%20infinite%20loop%20and%20hover%20sliding%20effect&amp;notes=%0D%0A%0D%0AThis%20is%20how%20this%20%22game%22%20works.%20The%20flashing%20text%20says%20%22LOOK%20AT%20ME%22.%20When%20you%20hover%20just%20underneath%20the%20text%20it%20reveals%20a%20little%20cartoon%20girl.%20It%20covers%20the%20girl%20again%20when%20you%20move%20the%20mouse%20away%20quickly.%20When%20you%20click%20the%20%22LOOK%20AT%20ME%22%20text%20the%20" title="del.icio.us"><img src="http://design-notes.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fplay-with-jquery-infinite-loop-and-hover-sliding-effect%2F&amp;title=Play%20with%20jQuery%20-%20infinite%20loop%20and%20hover%20sliding%20effect" title="StumbleUpon"><img src="http://design-notes.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fplay-with-jquery-infinite-loop-and-hover-sliding-effect%2F&amp;t=Play%20with%20jQuery%20-%20infinite%20loop%20and%20hover%20sliding%20effect" title="Facebook"><img src="http://design-notes.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fplay-with-jquery-infinite-loop-and-hover-sliding-effect%2F" title="Technorati"><img src="http://design-notes.info/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.designfloat.com/submit.php?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fplay-with-jquery-infinite-loop-and-hover-sliding-effect%2F&amp;title=Play%20with%20jQuery%20-%20infinite%20loop%20and%20hover%20sliding%20effect" title="Design Float"><img src="http://design-notes.info/wp-content/plugins/sociable/images/designfloat.png" title="Design Float" alt="Design Float" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fplay-with-jquery-infinite-loop-and-hover-sliding-effect%2F" title="Identi.ca"><img src="http://design-notes.info/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.friendfeed.com/share?title=Play%20with%20jQuery%20-%20infinite%20loop%20and%20hover%20sliding%20effect&amp;link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fplay-with-jquery-infinite-loop-and-hover-sliding-effect%2F" title="FriendFeed"><img src="http://design-notes.info/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fplay-with-jquery-infinite-loop-and-hover-sliding-effect%2F&amp;submitHeadline=Play%20with%20jQuery%20-%20infinite%20loop%20and%20hover%20sliding%20effect&amp;submitSummary=%0D%0A%0D%0AThis%20is%20how%20this%20%22game%22%20works.%20The%20flashing%20text%20says%20%22LOOK%20AT%20ME%22.%20When%20you%20hover%20just%20underneath%20the%20text%20it%20reveals%20a%20little%20cartoon%20girl.%20It%20covers%20the%20girl%20again%20when%20you%20move%20the%20mouse%20away%20quickly.%20When%20you%20click%20the%20%22LOOK%20AT%20ME%22%20text%20the%20&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://design-notes.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fplay-with-jquery-infinite-loop-and-hover-sliding-effect%2F&amp;title=Play%20with%20jQuery%20-%20infinite%20loop%20and%20hover%20sliding%20effect&amp;body=%0D%0A%0D%0AThis%20is%20how%20this%20%22game%22%20works.%20The%20flashing%20text%20says%20%22LOOK%20AT%20ME%22.%20When%20you%20hover%20just%20underneath%20the%20text%20it%20reveals%20a%20little%20cartoon%20girl.%20It%20covers%20the%20girl%20again%20when%20you%20move%20the%20mouse%20away%20quickly.%20When%20you%20click%20the%20%22LOOK%20AT%20ME%22%20text%20the%20" title="Ping.fm"><img src="http://design-notes.info/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://design-notes.info/tutorial/jquery-tutorial/play-with-jquery-infinite-loop-and-hover-sliding-effect/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Make A Dynamic Page Accordion Menu With jQuery</title>
		<link>http://design-notes.info/tutorial/wordpress/accordion-menu/</link>
		<comments>http://design-notes.info/tutorial/wordpress/accordion-menu/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 17:14:47 +0000</pubDate>
		<dc:creator>alexandra</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://design-notes.info/?p=1680</guid>
		<description><![CDATA[There are many ways to add an flexible accordion menu to your web page. Most of them use div or paragraph but in this post I&#8217;m going to use unordered list and jQuery toggle to make an accordion menu.The most important information here is how to toggle list and how to hide/show the related page [...]]]></description>
			<content:encoded><![CDATA[<p>There are many ways to add an flexible accordion menu to your web page. Most of them use div or paragraph but in this post I&#8217;m going to use <strong>unordered list and jQuery toggle</strong> to make an accordion menu.The most important information here is <strong>how to toggle list and how to hide/show the related page to viewer</strong>. I explained here specifically on dynamic page display with <strong>WordPress</strong>, you can always take the same theory and apply in other situations.</p>
<ol>Features:	</p>
<li>Work in Wordpress</li>
<li>Accordion Slide</li>
<li>Show only top level page list when visiting top level pages</li>
<li>Show current page&#8217;s child page</li>
<li>Show allpages when visiting child page</li>
</ol>
<h2>Wordpress Code to display page list</h2>
<p>I got this code from <a href="http://codex.wordpress.org/Template_Tags/wp_list_pages">wordpress.org </a></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #009900;">&#41;</span>
  <span style="color: #000088;">$children</span> <span style="color: #339933;">=</span> wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title_li=&amp;child_of=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;echo=0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">else</span>
  <span style="color: #000088;">$children</span> <span style="color: #339933;">=</span> wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title_li=&amp;child_of=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;echo=0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$children</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;ul&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$children</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;/ul&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>The code displays all pages. This is the html code generated by Wordpress</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;page-list&quot;&gt;&lt;ul&gt;
&lt;li class=&quot;page_item page-item-1611&quot;&gt;&lt;a href=&quot;http://design-notes.info/archives/&quot; title=&quot;Archives&quot;&gt;Archives&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;page_item page-item-742&quot;&gt;&lt;a href=&quot;http://design-notes.info/blogroll/&quot; title=&quot;Blogroll&quot;&gt;Blogroll&lt;/a&gt;
&lt;ul&gt;
&lt;li class=&quot;page_item page-item-1683&quot;&gt;&lt;a href=&quot;http://design-notes.info/blogroll/this-is-a-demo-page/&quot; title=&quot;This is a demo page&quot;&gt;This is a demo page&lt;/a&gt;&lt;/li&gt;
&nbsp;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;page_item page-item-1096&quot;&gt;&lt;a href=&quot;http://design-notes.info/linking/&quot; title=&quot;linking&quot;&gt;linking&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;page_item page-item-113&quot;&gt;&lt;a href=&quot;http://design-notes.info/about/&quot; title=&quot;About&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</pre></div></div>

<h2>Javascripts</h2>
<p>Now what we need to do is to create accordion with jQuery&#8217;s toggle function and make it dynamically display the page you want your reader to see. Wordpress&#8217;s &#8220;current_page_item&#8221; class is very useful here. I used it on line 5 to list parent pages and again on line 9 to show its child pages.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">ready</span><span style="color: #009900;">&#40;</span>function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//hide child page</span>
$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#page-list ul li.page_item ul'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//when navigate to a child page show all pages</span>
$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#page-list ul li.current_page_item'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ul&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//show page list when toggle</span>
$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#page-list ul li.active ul'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//show cerrent page's child page</span>
$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#page-list ul li.current_page_item ul'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	 $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#page-list ul li'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">click</span><span style="color: #009900;">&#40;</span>function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
$<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;active&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    $<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">children</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ul'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">slideToggle</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&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;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h2>CSS</h2>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#page-list</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#page-list</span> ul <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#page-list</span> ul li<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span><span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#page-list</span> ul li ul li<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#page-list</span> ul li ul li a<span style="color: #00AA00;">&#123;</span>
	<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#page-list</span> ul li a<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">150px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#f4f4f4</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<h2>Conclusion</h2>
<p>I first displayed all pages then hide or show them dynamically with jQuery. Its quite handy than using php alone. You can check out the demo page list on the sidebar by <strong>navigating to pages</strong>. I made a couple of demo pages for you too. </p>



ADD TO<a href="#" onclick="javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();"><img src="http://img44.imageshack.us/img44/3714/picture4p.png" alt="Add To Evernote" /></a>  If this helps, why not tell your friends?


	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fwordpress%2Faccordion-menu%2F&amp;title=Make%20A%20Dynamic%20Page%20Accordion%20Menu%20With%20jQuery" title="Reddit"><img src="http://design-notes.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fwordpress%2Faccordion-menu%2F&amp;title=Make%20A%20Dynamic%20Page%20Accordion%20Menu%20With%20jQuery&amp;notes=There%20are%20many%20ways%20to%20add%20an%20flexible%20accordion%20menu%20to%20your%20web%20page.%20Most%20of%20them%20use%20div%20or%20paragraph%20but%20in%20this%20post%20I%27m%20going%20to%20use%20unordered%20list%20and%20jQuery%20toggle%20to%20make%20an%20accordion%20menu.The%20most%20important%20information%20here%20is%20how%20to%20toggl" title="del.icio.us"><img src="http://design-notes.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fwordpress%2Faccordion-menu%2F&amp;title=Make%20A%20Dynamic%20Page%20Accordion%20Menu%20With%20jQuery" title="StumbleUpon"><img src="http://design-notes.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fwordpress%2Faccordion-menu%2F&amp;t=Make%20A%20Dynamic%20Page%20Accordion%20Menu%20With%20jQuery" title="Facebook"><img src="http://design-notes.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fwordpress%2Faccordion-menu%2F" title="Technorati"><img src="http://design-notes.info/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.designfloat.com/submit.php?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fwordpress%2Faccordion-menu%2F&amp;title=Make%20A%20Dynamic%20Page%20Accordion%20Menu%20With%20jQuery" title="Design Float"><img src="http://design-notes.info/wp-content/plugins/sociable/images/designfloat.png" title="Design Float" alt="Design Float" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fwordpress%2Faccordion-menu%2F" title="Identi.ca"><img src="http://design-notes.info/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.friendfeed.com/share?title=Make%20A%20Dynamic%20Page%20Accordion%20Menu%20With%20jQuery&amp;link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fwordpress%2Faccordion-menu%2F" title="FriendFeed"><img src="http://design-notes.info/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fwordpress%2Faccordion-menu%2F&amp;submitHeadline=Make%20A%20Dynamic%20Page%20Accordion%20Menu%20With%20jQuery&amp;submitSummary=There%20are%20many%20ways%20to%20add%20an%20flexible%20accordion%20menu%20to%20your%20web%20page.%20Most%20of%20them%20use%20div%20or%20paragraph%20but%20in%20this%20post%20I%27m%20going%20to%20use%20unordered%20list%20and%20jQuery%20toggle%20to%20make%20an%20accordion%20menu.The%20most%20important%20information%20here%20is%20how%20to%20toggl&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://design-notes.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fwordpress%2Faccordion-menu%2F&amp;title=Make%20A%20Dynamic%20Page%20Accordion%20Menu%20With%20jQuery&amp;body=There%20are%20many%20ways%20to%20add%20an%20flexible%20accordion%20menu%20to%20your%20web%20page.%20Most%20of%20them%20use%20div%20or%20paragraph%20but%20in%20this%20post%20I%27m%20going%20to%20use%20unordered%20list%20and%20jQuery%20toggle%20to%20make%20an%20accordion%20menu.The%20most%20important%20information%20here%20is%20how%20to%20toggl" title="Ping.fm"><img src="http://design-notes.info/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://design-notes.info/tutorial/wordpress/accordion-menu/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Make Your Header Responses To Mouse Movements with jParallax</title>
		<link>http://design-notes.info/tutorial/jquery-tutorial/make-your-header-responses-to-mouse-movements-with-jparallax/</link>
		<comments>http://design-notes.info/tutorial/jquery-tutorial/make-your-header-responses-to-mouse-movements-with-jparallax/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 10:04:07 +0000</pubDate>
		<dc:creator>alexandra</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://design-notes.info/?p=1521</guid>
		<description><![CDATA[jParallax is no news to jQuery lovers. For those who still dont know anything about it. Here is a little introduction.
jParallax turns a selected element into a &#8216;window&#8217;, or viewport, and all its children into absolutely positioned layers that can be seen through the viewport. These layers move in response to the mouse, and, depending [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://webdev.stephband.info/parallax.html">jParallax</a> is no news to jQuery lovers. For those who still dont know anything about it. Here is a little introduction.</p>
<blockquote><p>jParallax turns a selected element into a &#8216;window&#8217;, or viewport, and all its children into absolutely positioned layers that can be seen through the viewport. These layers move in response to the mouse, and, depending on their dimensions (and options for layer initialisation), they move by different amounts, in a parallaxy kind of way.</p></blockquote>
<p>Next, I will show you how to make a beautiful header that response to mouse movements. My portfolio site uses this trick, so you can see the <a href="http://alexandratong.com/2009">result</a> first.</p>
<h3>Linking javascripts</h3>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script src=&quot;js/jquery-1.3.2.js&quot; type=&quot;text/javascript&quot;&gt;&lt;!--mce:0--&gt;&lt;/script&gt;
&lt;script src=&quot;js/jquery.lightbox-0.5.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;!--mce:1--&gt;&lt;/script&gt;
&lt;script src=&quot;js/jquery.jparallax.js&quot; type=&quot;text/javascript&quot;&gt;&lt;!--mce:2--&gt;&lt;/script&gt;</pre></div></div>

<h3>HTML and CSS code.</h3>
<p>Setup the window, give its id name parallax and width, so only this area responses to mouse movements. As the diagram shows above, <strong>the image you list first goes to the back</strong>.<br />
Make sure the width is set properly to prevent collapsing view point. If any of the layer travels outside the parallax window, it will be hidden.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;parallax&quot;&gt; &lt;img style=&quot;width: 400px;&quot; src=&quot;images/0.png&quot; alt=&quot;&quot; /&gt;
&lt;img style=&quot;width: 500px;&quot; src=&quot;images/1.png&quot; alt=&quot;&quot; /&gt;
&lt;img style=&quot;width: 600px;&quot; src=&quot;images/2.png&quot; alt=&quot;&quot; /&gt;
&lt;img style=&quot;width: 550px;&quot; src=&quot;images/3.png&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;</pre></div></div>

<p>CSS</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#parallax</span>
    <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">800px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">450px</span><span style="color: #00AA00;">;</span>border<span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span> <span style="color: #933;">20px</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>My image 0<br />
<img class="alignnone" title="jparallax tutorial" src="http://img197.imageshack.us/img197/6347/81312407.png" alt="" width="600" /><br />
My image 1<br />
<img class="alignnone" title="jparallax tutorial" src="http://img194.imageshack.us/img194/6839/93527969.png" alt="" width="600" /><br />
My image 2<br />
<img class="alignnone" title="jparallax tutorial" src="http://img192.imageshack.us/img192/8944/40750885.png" alt="" width="600" /><br />
My image 3<br />
<img class="alignnone" title="jparallax tutorial" src="http://img189.imageshack.us/img189/6692/28901097.png" alt="" width="600" /></p>
<h3>Basic JavaScripts</h3>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">jQuery(document).ready(function(){
	jQuery('#parallax').();
});</pre></div></div>

<p>This is the<a href="http://design-notes.info/demo/parallax.html"> result </a>with default settings. As you can see, it is a bit weird.</p>
<h3>Use Layers option</h3>
<h4>jQuery(&#8216;element&#8217;).jparallax(options, layer_0_options, layer_1_options, etc.);</h4>
<p>I disabled the Y axis movement and gave travel range to layer 0 (image 0) and layer 1(image 1). Now I have a nice ocean view header!!</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">jQuery(document).ready(function(){
	jQuery('#parallax').jparallax({yparallax:false},{xtravel: '100px'},{xtravel: '300px'});
});</pre></div></div>




ADD TO<a href="#" onclick="javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();"><img src="http://img44.imageshack.us/img44/3714/picture4p.png" alt="Add To Evernote" /></a>  If this helps, why not tell your friends?


	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-your-header-responses-to-mouse-movements-with-jparallax%2F&amp;title=Make%20Your%20Header%20Responses%20To%20Mouse%20Movements%20with%20jParallax%20" title="Reddit"><img src="http://design-notes.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-your-header-responses-to-mouse-movements-with-jparallax%2F&amp;title=Make%20Your%20Header%20Responses%20To%20Mouse%20Movements%20with%20jParallax%20&amp;notes=jParallax%20is%20no%20news%20to%20jQuery%20lovers.%20For%20those%20who%20still%20dont%20know%20anything%20about%20it.%20Here%20is%20a%20little%20introduction.%0D%0AjParallax%20turns%20a%20selected%20element%20into%20a%20%27window%27%2C%20or%20viewport%2C%20and%20all%20its%20children%20into%20absolutely%20positioned%20layers%20that%20can%20b" title="del.icio.us"><img src="http://design-notes.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-your-header-responses-to-mouse-movements-with-jparallax%2F&amp;title=Make%20Your%20Header%20Responses%20To%20Mouse%20Movements%20with%20jParallax%20" title="StumbleUpon"><img src="http://design-notes.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-your-header-responses-to-mouse-movements-with-jparallax%2F&amp;t=Make%20Your%20Header%20Responses%20To%20Mouse%20Movements%20with%20jParallax%20" title="Facebook"><img src="http://design-notes.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-your-header-responses-to-mouse-movements-with-jparallax%2F" title="Technorati"><img src="http://design-notes.info/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.designfloat.com/submit.php?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-your-header-responses-to-mouse-movements-with-jparallax%2F&amp;title=Make%20Your%20Header%20Responses%20To%20Mouse%20Movements%20with%20jParallax%20" title="Design Float"><img src="http://design-notes.info/wp-content/plugins/sociable/images/designfloat.png" title="Design Float" alt="Design Float" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-your-header-responses-to-mouse-movements-with-jparallax%2F" title="Identi.ca"><img src="http://design-notes.info/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.friendfeed.com/share?title=Make%20Your%20Header%20Responses%20To%20Mouse%20Movements%20with%20jParallax%20&amp;link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-your-header-responses-to-mouse-movements-with-jparallax%2F" title="FriendFeed"><img src="http://design-notes.info/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-your-header-responses-to-mouse-movements-with-jparallax%2F&amp;submitHeadline=Make%20Your%20Header%20Responses%20To%20Mouse%20Movements%20with%20jParallax%20&amp;submitSummary=jParallax%20is%20no%20news%20to%20jQuery%20lovers.%20For%20those%20who%20still%20dont%20know%20anything%20about%20it.%20Here%20is%20a%20little%20introduction.%0D%0AjParallax%20turns%20a%20selected%20element%20into%20a%20%27window%27%2C%20or%20viewport%2C%20and%20all%20its%20children%20into%20absolutely%20positioned%20layers%20that%20can%20b&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://design-notes.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-your-header-responses-to-mouse-movements-with-jparallax%2F&amp;title=Make%20Your%20Header%20Responses%20To%20Mouse%20Movements%20with%20jParallax%20&amp;body=jParallax%20is%20no%20news%20to%20jQuery%20lovers.%20For%20those%20who%20still%20dont%20know%20anything%20about%20it.%20Here%20is%20a%20little%20introduction.%0D%0AjParallax%20turns%20a%20selected%20element%20into%20a%20%27window%27%2C%20or%20viewport%2C%20and%20all%20its%20children%20into%20absolutely%20positioned%20layers%20that%20can%20b" title="Ping.fm"><img src="http://design-notes.info/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://design-notes.info/tutorial/jquery-tutorial/make-your-header-responses-to-mouse-movements-with-jparallax/feed/</wfw:commentRss>
		<slash:comments>80</slash:comments>
		</item>
		<item>
		<title>Make fancy light up RSS button with jQuery fading</title>
		<link>http://design-notes.info/tutorial/jquery-tutorial/make-fancy-light-up-rss-button-with-jquery-fading/</link>
		<comments>http://design-notes.info/tutorial/jquery-tutorial/make-fancy-light-up-rss-button-with-jquery-fading/#comments</comments>
		<pubDate>Tue, 05 May 2009 10:37:17 +0000</pubDate>
		<dc:creator>alexandra</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://design-notes.info/?p=1128</guid>
		<description><![CDATA[It is important to make your RSS button stand out in web design and there are many techniques. I have seen many sites use this kind of lighting up RSS button. For example: vectorvalley.com: 
It is only a simple animation technique. In this tutorial, I will show you how to do it with jQuery Fading [...]]]></description>
			<content:encoded><![CDATA[<p>It is important to make your RSS button stand out in web design and there are many techniques. I have seen many sites use this kind of lighting up RSS button. For example: <a target="_blank" href="http://www.vectorvalley.com/">vectorvalley.com</a>: <img src="http://design-notes.info/wp-content/uploads/2009/05/picture-10.png" alt="Make fancy light up RSS button with jQuery fading" title="Make fancy light up RSS button with jQuery fading" width="237" height="116" class="alignnone size-full wp-image-1138" /></p>
<p>It is only a simple animation technique. In this tutorial, I will show you how to do it with<a href="http://docs.jquery.com/Effects/fadeTo#speedopacitycallback" target="_blank"> jQuery Fading</a> effect. It is actually very simple.</p>
<p>You can look at the <a href="http://design-notes.info/demo/rss.html" target="_blank">demo</a> first.</p>
<p>First, I downloaded this RSS icon from devian art<img src="http://design-notes.info/wp-content/uploads/2009/05/rss-300x225.png" alt="rss" title="rss" width="300" height="225" class="alignnone size-medium wp-image-1129" /><br />
Then I made it black and white<br />
<img src="http://design-notes.info/wp-content/uploads/2009/05/rss_bw-300x225.png" alt="rss_bw" title="rss_bw" width="300" height="225" class="alignnone size-medium wp-image-1130" /><br />
What we gonna do is to make the button <strong>fade from black and white to full color</strong>. We set black white as default so your RSS button&#8217;s background image is rss_bw.png at first. </p>
<h2>HTML</h2>
<p>Let&#8217;s do some simple preparation: the html is very simple.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;rss&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;fancy light up RSS&quot;&gt;&lt;/a&gt;&lt;/div&gt;</pre></div></div>

<h2>CSS Code</h2>
<p>At this part, we need to define RSS buton&#8217;s default background image as well as <strong>span</strong> that holds the colored background image.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#rss</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#rss</span> a<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">rss_bw.png</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
 <span style="color: #cc00cc;">#rss</span> span.hover<span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">rss.png</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<h2>Using fadeTo</h2>
<p></p>
<h3>fadeTo( speed, opacity, [callback] )</h3>
<p>What this javascript does is <strong>find &#8220;a&#8221; under #rss > append &#8220;span&#8221; within a element > set span&#8217;s opacity to 0 at first > when user hovers in, change the opacity to 1 within 800ms > when user hovers out change the opacity back</strong><br />
This is what the html looks like with JavaScript<br />
<div id="attachment_1135" class="wp-caption alignnone" style="width: 539px"><img src="http://design-notes.info/wp-content/uploads/2009/05/picture-9.png" alt="Make fancy light up RSS button with jQuery fading" title="Make fancy light up RSS button with jQuery fading" width="529" height="122" class="size-full wp-image-1135" /><p class="wp-caption-text">Make fancy light up RSS button with jQuery fading</p></div></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<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: #009900;">&#40;</span><span style="color: #3366CC;">'#rss a'</span><span style="color: #009900;">&#41;</span>   
    <span style="color: #006600; font-style: italic;">// create our new span.hover and loop through anchor:</span>
    .<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;span class=&quot;hover&quot; id=&quot;rsscolor&quot;/&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</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> $span <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&gt; span.hover'</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'opacity'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>      
      <span style="color: #006600; font-style: italic;">// when the user hovers in and out </span>
      $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</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: #006600; font-style: italic;">// on hover</span>
        <span style="color: #006600; font-style: italic;">// stop any animations currently running, and fade to opacity: 1</span>
        $span.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeTo</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">800</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</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: #006600; font-style: italic;">// off hover</span>
        <span style="color: #006600; font-style: italic;">// again, stop any animations currently running, and fade out</span>
        $span.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeTo</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">800</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</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>
    <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></div></div>




ADD TO<a href="#" onclick="javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();"><img src="http://img44.imageshack.us/img44/3714/picture4p.png" alt="Add To Evernote" /></a>  If this helps, why not tell your friends?


	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-fancy-light-up-rss-button-with-jquery-fading%2F&amp;title=Make%20fancy%20light%20up%20Design-Notes%20button%20with%20jQuery%20fading" title="Reddit"><img src="http://design-notes.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-fancy-light-up-rss-button-with-jquery-fading%2F&amp;title=Make%20fancy%20light%20up%20Design-Notes%20button%20with%20jQuery%20fading&amp;notes=It%20is%20important%20to%20make%20your%20RSS%20button%20stand%20out%20in%20web%20design%20and%20there%20are%20many%20techniques.%20I%20have%20seen%20many%20sites%20use%20this%20kind%20of%20lighting%20up%20RSS%20button.%20For%20example%3A%20vectorvalley.com%3A%20%0D%0A%0D%0AIt%20is%20only%20a%20simple%20animation%20technique.%20In%20this%20tutoria" title="del.icio.us"><img src="http://design-notes.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-fancy-light-up-rss-button-with-jquery-fading%2F&amp;title=Make%20fancy%20light%20up%20Design-Notes%20button%20with%20jQuery%20fading" title="StumbleUpon"><img src="http://design-notes.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-fancy-light-up-rss-button-with-jquery-fading%2F&amp;t=Make%20fancy%20light%20up%20Design-Notes%20button%20with%20jQuery%20fading" title="Facebook"><img src="http://design-notes.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-fancy-light-up-rss-button-with-jquery-fading%2F" title="Technorati"><img src="http://design-notes.info/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.designfloat.com/submit.php?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-fancy-light-up-rss-button-with-jquery-fading%2F&amp;title=Make%20fancy%20light%20up%20Design-Notes%20button%20with%20jQuery%20fading" title="Design Float"><img src="http://design-notes.info/wp-content/plugins/sociable/images/designfloat.png" title="Design Float" alt="Design Float" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-fancy-light-up-rss-button-with-jquery-fading%2F" title="Identi.ca"><img src="http://design-notes.info/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.friendfeed.com/share?title=Make%20fancy%20light%20up%20Design-Notes%20button%20with%20jQuery%20fading&amp;link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-fancy-light-up-rss-button-with-jquery-fading%2F" title="FriendFeed"><img src="http://design-notes.info/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-fancy-light-up-rss-button-with-jquery-fading%2F&amp;submitHeadline=Make%20fancy%20light%20up%20Design-Notes%20button%20with%20jQuery%20fading&amp;submitSummary=It%20is%20important%20to%20make%20your%20RSS%20button%20stand%20out%20in%20web%20design%20and%20there%20are%20many%20techniques.%20I%20have%20seen%20many%20sites%20use%20this%20kind%20of%20lighting%20up%20RSS%20button.%20For%20example%3A%20vectorvalley.com%3A%20%0D%0A%0D%0AIt%20is%20only%20a%20simple%20animation%20technique.%20In%20this%20tutoria&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://design-notes.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fmake-fancy-light-up-rss-button-with-jquery-fading%2F&amp;title=Make%20fancy%20light%20up%20Design-Notes%20button%20with%20jQuery%20fading&amp;body=It%20is%20important%20to%20make%20your%20RSS%20button%20stand%20out%20in%20web%20design%20and%20there%20are%20many%20techniques.%20I%20have%20seen%20many%20sites%20use%20this%20kind%20of%20lighting%20up%20RSS%20button.%20For%20example%3A%20vectorvalley.com%3A%20%0D%0A%0D%0AIt%20is%20only%20a%20simple%20animation%20technique.%20In%20this%20tutoria" title="Ping.fm"><img src="http://design-notes.info/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://design-notes.info/tutorial/jquery-tutorial/make-fancy-light-up-rss-button-with-jquery-fading/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Flashy intro with jQuery animation</title>
		<link>http://design-notes.info/tutorial/jquery-tutorial/flashy-intro-with-jquery-animation/</link>
		<comments>http://design-notes.info/tutorial/jquery-tutorial/flashy-intro-with-jquery-animation/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 08:37:45 +0000</pubDate>
		<dc:creator>alexandra</dc:creator>
				<category><![CDATA[Feature Articles]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://design-notes.info/?p=918</guid>
		<description><![CDATA[Remember those days which almost every website has a Flash intro or header that makes you wait un&#8230; forever. Now more and more people are using jQuery&#8217;s animation function to make their sites interesting. Let&#8217;s see how we do it.
Try the demo.

Header:
link jquery and jQuery color plugin
&#60;script src=&#34;js/jquery-1.3.2.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;
&#60;script type=&#34;text/javascript&#34; language=&#34;Javascript&#34; src=&#34;js/jquery.color.js&#34;&#62;&#60;/script&#62;
The HTML:
I used a [...]]]></description>
			<content:encoded><![CDATA[<p>Remember those days which almost every website has a Flash intro or header that makes you wait un&#8230; forever. Now more and more people are using jQuery&#8217;s animation function to make their sites interesting. Let&#8217;s see how we do it.</p>
<p>Try the <a href="http://design-notes.info/demo/flashy.html" target="_blank">demo</a>.<br />
<img class="alignnone size-medium wp-image-962" title="Flashy intro with jQuery animation" src="http://design-notes.info/wp-content/uploads/2009/04/picture-112-300x125.png" alt="Flashy intro with jQuery animation" width="300" height="125" /></p>
<h2>Header:</h2>
<p>link jquery and <a href="http://plugins.jquery.com/project/color" target="_blank">jQuery color</a> plugin</p>
<pre class="html"><span class="htmlScriptTag">&lt;script src=<span class="htmlAttributeValue">&quot;js/jquery-1.3.2.js&quot;</span> type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span>
<span class="htmlScriptTag">&lt;script type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span> language=<span class="htmlAttributeValue">&quot;Javascript&quot;</span> src=<span class="htmlAttributeValue">&quot;js/jquery.color.js&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span></pre>
<h2>The HTML:</h2>
<p>I used a list of links, like a menu, because I want to be able to make them to real links in the future. For now the links are empty. <strong>Each link</strong> has a <strong>class of &#8220;c+number&#8221; </strong>which stands for the color number in the color list we make later in the JavaScript.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;container&quot;&gt;
&lt;ul id=&quot;navigator&quot; class=&quot;fancy&quot;&gt;
	&lt;li&gt;&lt;a class=&quot;c1&quot; href=&quot;#&quot;&gt;Design-Notes&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a class=&quot;c2&quot; href=&quot;#&quot;&gt;Likes to be&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a class=&quot;c3&quot; href=&quot;#&quot;&gt;Creative&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</pre></div></div>

<h2>CSS</h2>
<p>This part is pretty standard, <strong>dark </strong>background goes well with this intro.<code>#navigator li a</code>&#8217;s <strong>position</strong> has to be defined. It can either be <strong>absolute or relative</strong>. Each will give you a different result of animation.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Arial</span><span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
a<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#container</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">600px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#navigator</span> li<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#navigator</span> li a<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<h2>JavaScript</h2>
<p>A litter harder than my previous post on <a href="http://design-notes.info/tutorial/jquery-tutorial/build-a-simple-cost-estimator-with-jquery-ui-slider/">the cost estimator with UI</a> but still quite short.</p>
<h3>Using animation:</h3>
<p><code>animate( Hash params, String|Number speed, String easing, Function callback<br />
(optional) A function to be executed whenever the animation completes.<br />
)</code><br />
You can use <code>fontSize,color, backgroundColor, width and borderWidth </code>etc. Then define the speed of your animation. You can use strings like <strong>slow, fast </strong>or integers in milliseconds (1000 =1 second).<br />
here is a simple example:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myDiv&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> color<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;pink&quot;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Here is our code:</p>
<ul>
<li>Line 1:choose the colors you wan to use, put them in an array called menu_over_color</li>
<li>Line 3:The object I will animate is a under navigator, so select all of them with <code>each</code>:<br />
<blockquote><p><strong>Each</strong>: Execute a function within the context of every matched element.</p></blockquote>
</li>
<li>Line 4:point the <code>class</code> attribute to our color list in line1. <code>substring(start,stop)</code>for example: the <code>substring(1,3)</code>&#8217;s result of &#8220;hello&#8221; is &#8220;hel&#8221;. I originally had fifteen colors listed. <a href="http://www.learningjquery.com/wp-content/themes/ljq/docs.php?fn=attr" target="_blank">Here</a> is a more detailed explanation on <code>attr</code></li>
<li>Lin5 to 13: animation sequence: change<strong> color&gt;font size&gt;position&gt;background color&gt; then settle down to white text and their own background color</strong>. This is not the only option, play around with it. You could surprise yourself.</li>
<li>Last 8 lines are optional. They deal with hover.</li>
</ul>
<p>Finally, I suggest you read about<a href="http://docs.jquery.com/Effects/animate#paramsdurationeasingcallback" target="_blank"> chained animation and unqueued animation animation</a>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/* the colors */</span>
<span style="color: #003366; font-weight: bold;">var</span> menu_over_colors <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;#ffffff&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#55C7FF&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#FF5A8D&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#FFA324&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#f453g5&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">/* the colors you want to use*/</span>
$<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: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#navigator &gt; li &gt; a&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</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> over_color <span style="color: #339933;">=</span> menu_over_colors<span style="color: #009900;">&#91;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'class'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#navigator li a&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> color<span style="color: #339933;">:</span> over_color <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">/* animate text color for all text*/</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#navigator li+li+li a&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>fontSize<span style="color: #339933;">:</span> <span style="color: #3366CC;">'3em'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">/* animate text of the third list*/</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#navigator li+li a&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>top<span style="color: #339933;">:</span> <span style="color: #3366CC;">'50px'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">/* animate text of the second list*/</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#navigator li a&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>left<span style="color: #339933;">:</span> <span style="color: #3366CC;">'50px'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300</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>fontSize<span style="color: #339933;">:</span> <span style="color: #3366CC;">'1.5em'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300</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> backgroundColor<span style="color: #339933;">:</span>over_color <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">500</span><span style="color: #339933;">,</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> over_color  <span style="color: #339933;">=</span> menu_over_colors<span style="color: #009900;">&#91;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'class'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">/* point out the colors again*/</span>
$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</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>color<span style="color: #339933;">:</span><span style="color: #3366CC;">'white'</span><span style="color: #339933;">,</span>backgroundColor<span style="color: #339933;">:</span>over_color<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #CC0000;">300</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>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">/* animate all text again with callback function*/</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#navigator &gt; li &gt; a&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</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: #006600; font-style: italic;">//over</span>
			<span style="color: #003366; font-weight: bold;">var</span> over_color  <span style="color: #339933;">=</span> menu_over_colors<span style="color: #009900;">&#91;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'class'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</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> color<span style="color: #339933;">:</span> over_color <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">500</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</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> backgroundColor<span style="color: #339933;">:</span>over_color <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">500</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</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: #006600; font-style: italic;">//out</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</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>color<span style="color: #339933;">:</span> menu_over_colors<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #CC0000;">500</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> 
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>




ADD TO<a href="#" onclick="javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();"><img src="http://img44.imageshack.us/img44/3714/picture4p.png" alt="Add To Evernote" /></a>  If this helps, why not tell your friends?


	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fflashy-intro-with-jquery-animation%2F&amp;title=Flashy%20intro%20with%20jQuery%20animation" title="Reddit"><img src="http://design-notes.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fflashy-intro-with-jquery-animation%2F&amp;title=Flashy%20intro%20with%20jQuery%20animation&amp;notes=Remember%20those%20days%20which%20almost%20every%20website%20has%20a%20Flash%20intro%20or%20header%20that%20makes%20you%20wait%20un...%20forever.%20Now%20more%20and%20more%20people%20are%20using%20jQuery%27s%20animation%20function%20to%20make%20their%20sites%20interesting.%20Let%27s%20see%20how%20we%20do%20it.%0D%0A%0D%0ATry%20the%20demo.%0D%0A%0D%0A" title="del.icio.us"><img src="http://design-notes.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fflashy-intro-with-jquery-animation%2F&amp;title=Flashy%20intro%20with%20jQuery%20animation" title="StumbleUpon"><img src="http://design-notes.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fflashy-intro-with-jquery-animation%2F&amp;t=Flashy%20intro%20with%20jQuery%20animation" title="Facebook"><img src="http://design-notes.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fflashy-intro-with-jquery-animation%2F" title="Technorati"><img src="http://design-notes.info/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.designfloat.com/submit.php?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fflashy-intro-with-jquery-animation%2F&amp;title=Flashy%20intro%20with%20jQuery%20animation" title="Design Float"><img src="http://design-notes.info/wp-content/plugins/sociable/images/designfloat.png" title="Design Float" alt="Design Float" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fflashy-intro-with-jquery-animation%2F" title="Identi.ca"><img src="http://design-notes.info/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.friendfeed.com/share?title=Flashy%20intro%20with%20jQuery%20animation&amp;link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fflashy-intro-with-jquery-animation%2F" title="FriendFeed"><img src="http://design-notes.info/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fflashy-intro-with-jquery-animation%2F&amp;submitHeadline=Flashy%20intro%20with%20jQuery%20animation&amp;submitSummary=Remember%20those%20days%20which%20almost%20every%20website%20has%20a%20Flash%20intro%20or%20header%20that%20makes%20you%20wait%20un...%20forever.%20Now%20more%20and%20more%20people%20are%20using%20jQuery%27s%20animation%20function%20to%20make%20their%20sites%20interesting.%20Let%27s%20see%20how%20we%20do%20it.%0D%0A%0D%0ATry%20the%20demo.%0D%0A%0D%0A&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://design-notes.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fflashy-intro-with-jquery-animation%2F&amp;title=Flashy%20intro%20with%20jQuery%20animation&amp;body=Remember%20those%20days%20which%20almost%20every%20website%20has%20a%20Flash%20intro%20or%20header%20that%20makes%20you%20wait%20un...%20forever.%20Now%20more%20and%20more%20people%20are%20using%20jQuery%27s%20animation%20function%20to%20make%20their%20sites%20interesting.%20Let%27s%20see%20how%20we%20do%20it.%0D%0A%0D%0ATry%20the%20demo.%0D%0A%0D%0A" title="Ping.fm"><img src="http://design-notes.info/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://design-notes.info/tutorial/jquery-tutorial/flashy-intro-with-jquery-animation/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Build a simple cost estimator with jQuery UI Slider</title>
		<link>http://design-notes.info/tutorial/jquery-tutorial/build-a-simple-cost-estimator-with-jquery-ui-slider/</link>
		<comments>http://design-notes.info/tutorial/jquery-tutorial/build-a-simple-cost-estimator-with-jquery-ui-slider/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 19:47:24 +0000</pubDate>
		<dc:creator>alexandra</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[Slider]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://design-notes.info/?p=808</guid>
		<description><![CDATA[I believe everyone is very familiar with jQury UI-JQuery&#8217;s user interface add on. It is a great library and themes are quite fancy, but its lack of documentation often frustrate people especially beginners.Thats why I would like to write a simple tutorial
Lately, I read a post on online tools for designers at a web site [...]]]></description>
			<content:encoded><![CDATA[<p>I believe everyone is very familiar with <a href="http://jqueryui.com/" target="_blank">jQury UI</a>-JQuery&#8217;s user interface add on. It is a great library and themes are quite fancy, but its lack of documentation often frustrate people especially beginners.Thats why I would like to write a simple tutorial</p>
<p>Lately, I read a post on online tools for designers at a web site (can&#8217;t remember which one). One of the tools in the selection is a cost estimator which was very detailed and build with PHP and JavaScript. One problem with this. It was on  a well established  design agency&#8217;s web site. Come on!! who would refer their customers to go to use a cost estimator on a competitor&#8217;s web site? So I came up with my version of  <a href="http://design-notes.info/resources/11-mustknow-free-online-tools-for-web-design-and-development/">free online tools for designers</a>.</p>
<p>Also, I m in the process of building my online portfolio, and came up with an idea of having a simple cost estimator for potential clients. Here is how I did it. Its very simple, definitely beginner level. So don&#8217;t be afraid to read on. As for experts. wait up a more complicated version&#8217;s on its way.</p>
<h2>Header</h2>
<p>Straightforward: link every scripts and make sure ui.slider.js is in the same directory with other js files</p>
<ul>
<li>jquery-ui-1.7.1.custom.css</li>
<li>jquery-1.3.2.js</li>
<li>jquery-ui-1.7.1.custom.min.js</li>
</ul>
<pre class="html"><span class="htmlOtherTag">&lt;title&gt;</span>Simple Cost Estimator<span class="htmlOtherTag">&lt;/title&gt;</span>
<span class="htmlOtherTag">&lt;link type=<span class="htmlAttributeValue">&quot;text/css&quot;</span> href=<span class="htmlAttributeValue">&quot;css/smoothness/jquery-ui-1.7.1.custom.css&quot;</span> rel=<span class="htmlAttributeValue">&quot;stylesheet&quot;</span> /&gt;</span>
<span class="htmlScriptTag">&lt;script type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span> src=<span class="htmlAttributeValue">&quot;js/jquery-1.3.2.js&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span>
<span class="htmlScriptTag">&lt;script type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span> src=<span class="htmlAttributeValue">&quot;js/jquery-ui-1.7.1.custom.min.js&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span></pre>
<h2>CSS</h2>
<p>I didn&#8217;t stylize much, just need it to work. Basically it is same with the UI default theme.</p>
<pre class="css"><span class="cssSelector">#panel-contents{</span><span class="cssProperty">position</span><span class="cssRest">:</span><span class="cssValue">relative</span><span class="cssRest">;</span><span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue">40px</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#small-label{</span> <span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue">url(images/small_label.gif) no-repeat</span><span class="cssRest">;</span> <span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue">4px</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">17px</span><span class="cssRest">;</span> <span class="cssProperty">overflow</span><span class="cssRest">:</span><span class="cssValue">hidden</span><span class="cssRest">;</span><span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue">left</span><span class="cssRest">;</span> <span class="cssSelector">}</span>
<span class="cssSelector">#large-label{</span> <span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue">url(images/large_label.gif) no-repeat</span><span class="cssRest">;</span> <span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue">18px</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">17px</span><span class="cssRest">;</span> <span class="cssProperty">overflow</span><span class="cssRest">:</span><span class="cssValue">hidden</span><span class="cssRest">;</span><span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue">left</span><span class="cssRest">;</span> <span class="cssSelector">}</span>
<span class="cssSelector">#slider-bar{</span> <span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue">url(images/slider.gif) no-repeat</span><span class="cssRest">;</span> <span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue">4px</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">100px</span><span class="cssRest">;</span> <span class="cssProperty">position</span><span class="cssRest">:</span><span class="cssValue">relative</span><span class="cssRest">;</span> <span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue">left</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#slider-handle{</span> <span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue">url(images/slider_handle.gif) no-repeat</span><span class="cssRest">;</span> <span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue">12px</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">13px</span><span class="cssRest">;</span> <span class="cssProperty">overflow</span><span class="cssRest">:</span><span class="cssValue">hidden</span><span class="cssRest">;</span><span class="cssProperty">position</span><span class="cssRest">:</span><span class="cssValue">absolute</span><span class="cssRest">;</span>z-index:1;<span class="cssSelector">}</span>
<span class="cssSelector">#slider-bubble{</span> <span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue">url(images/callout.gif) no-repeat</span><span class="cssRest">;</span> <span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue">46px</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">38px</span><span class="cssRest">;</span> <span class="cssProperty">overflow</span><span class="cssRest">:</span><span class="cssValue">hidden</span><span class="cssRest">;</span> <span class="cssProperty">position</span><span class="cssRest">:</span><span class="cssValue">absolute</span><span class="cssRest">;</span> <span class="cssProperty">top</span><span class="cssRest">:</span><span class="cssValue">-50px</span><span class="cssRest">;</span><span class="cssProperty">padding</span><span class="cssRest">:</span><span class="cssValue">8px 0 0 0</span><span class="cssRest">;</span><span class="cssProperty">text-align</span><span class="cssRest">:</span><span class="cssValue">center</span><span class="cssRest">;</span><span class="cssProperty">font-weight</span><span class="cssRest">:</span><span class="cssValue">bold</span><span class="cssRest">;</span><span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue">#202020</span><span class="cssRest">;</span> <span class="cssSelector">}</span>
<span class="cssSelector">#box{</span><span class="cssProperty">position</span><span class="cssRest">:</span><span class="cssValue">absolute</span><span class="cssRest">;</span> <span class="cssProperty">left</span><span class="cssRest">:</span><span class="cssValue">40px</span><span class="cssRest">;</span><span class="cssProperty">background-color</span><span class="cssRest">:</span><span class="cssValue">#202020</span><span class="cssRest">;</span><span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">200px</span><span class="cssRest">;</span><span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue">200px</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#container{</span><span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">700px</span><span class="cssRest">;</span> <span class="cssProperty">margin</span><span class="cssRest">:</span><span class="cssValue">auto</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">input{</span><span class="cssProperty">font-size</span><span class="cssRest">:</span><span class="cssValue"> 1em</span><span class="cssRest">;</span><span class="cssSelector">}</span>
<span class="cssSelector">#rate{</span><span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue">#bfbfbf</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">4em</span><span class="cssRest">;</span> <span class="cssProperty">padding</span><span class="cssRest">:</span><span class="cssValue">0 3px</span><span class="cssRest">;</span><span class="cssSelector">}</span></pre>
<h2>JavaScript: The slider controls page number which is from 0 to 20.</h2>
<ul>
<li>value:initial value</li>
<li>min:minimum value(0)</li>
<li>max: maximum value(20)</li>
<li>step: the amount of each interval(1). This means it slides one for each step, and we have 20 steps</li>
<li>#amount is page amount</li>
<li>Price=rate x amount</li>
<li>(ui.value) is slider&#8217;s current value, when you slide it</li>
<li>slider(&#8220;value&#8221;) means slider&#8217;s initial value which is 0</li>
<li>here is how to calculate price in javascript: $ sign plus ui current value multiply rate input value.
<pre class="js">'$'+ui.value*$("#rate").attr("value")</pre>
</li>
<li>last two line&#8217;s function is to set everything back to 0 (as our initial value is 0) after refreshing</li>
</ul>
<pre class="js">&lt;script type="text/javascript"&gt;
$(function() {
$("#slider").slider({
value:0,
min: 0,
max: 20,
step: 1,
slide: function(event, ui) {
$("#amount").val(ui.value);
$("#price").val('$'+ui.value*$("#rate").attr("value"));
}
});
$("#amount").val($("#slider").slider("value"));
$("#price").val('$' + $("#slider").slider("value"));
});
&lt;/script&gt;</pre>
<h2>HTML</h2>
<h3>step1 call the slider</h3>
<pre class="html"><span class="htmlOtherTag">&lt;h1&gt;</span>Build yourself a cost estimator with jQuery UI<span class="htmlOtherTag">&lt;/h1&gt;</span>
<span class="htmlOtherTag">&lt;div id=<span class="htmlAttributeValue">&quot;slider&quot;</span>&gt;</span><span class="htmlOtherTag">&lt;/div&gt;</span></pre>
<h3>step2: write three input fields</h3>
<pre class="html"><span class="htmlOtherTag">&lt;p&gt;</span>
<span class="htmlOtherTag">&lt;label for=<span class="htmlAttributeValue">&quot;rate&quot;</span>&gt;</span>Rate in US dollar:<span class="htmlOtherTag">&lt;/label&gt;</span>
<span class="htmlFormTag">&lt;input type=<span class="htmlAttributeValue">&quot;text&quot;</span> id=<span class="htmlAttributeValue">&quot;rate&quot;</span> style=<span class="htmlAttributeValue">&quot;<span class="cssProperty">border</span><span class="cssRest">:</span><span class="cssValue">0; color:#f6931f</span><span class="cssRest">;</span> <span class="cssProperty">font-weight</span><span class="cssRest">:</span><span class="cssValue">bold</span><span class="cssRest">;</span>&quot;</span> /&gt;</span>
<span class="htmlOtherTag">&lt;label for=<span class="htmlAttributeValue">&quot;amount&quot;</span>&gt;</span>Page number:<span class="htmlOtherTag">&lt;/label&gt;</span>
<span class="htmlFormTag">&lt;input type=<span class="htmlAttributeValue">&quot;text&quot;</span> id=<span class="htmlAttributeValue">&quot;amount&quot;</span> style=<span class="htmlAttributeValue">&quot;<span class="cssProperty">border</span><span class="cssRest">:</span><span class="cssValue">0; color:#f6931f</span><span class="cssRest">;</span> <span class="cssProperty">font-weight</span><span class="cssRest">:</span><span class="cssValue">bold</span><span class="cssRest">;</span>&quot;</span> /&gt;</span>
<span class="htmlOtherTag">&lt;/p&gt;</span>
<span class="htmlOtherTag">&lt;p&gt;</span>
<span class="htmlOtherTag">&lt;label for=<span class="htmlAttributeValue">&quot;price&quot;</span>&gt;</span>Price:<span class="htmlOtherTag">&lt;/label&gt;</span>
<span class="htmlFormTag">&lt;input type=<span class="htmlAttributeValue">&quot;text&quot;</span> id=<span class="htmlAttributeValue">&quot;price&quot;</span> style=<span class="htmlAttributeValue">&quot;<span class="cssProperty">border</span><span class="cssRest">:</span><span class="cssValue">0; color:#f6931f</span><span class="cssRest">;</span> <span class="cssProperty">font-weight</span><span class="cssRest">:</span><span class="cssValue">bold</span><span class="cssRest">;</span>&quot;</span> /&gt;</span>
<span class="htmlOtherTag">&lt;/p&gt;</span></pre>
<p>Finally, this is the <a href="http://design-notes.info/demo/cost/costestimator.html">result.</a></p>
<p>You might want to read more on using<a title="How to creat a Feature Article slide " href="http://design-notes.info/tutorial/jquery-tutorial/how-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator/" target="_self"> jQuery Cycle and jCarousel in my other tutorial</a></p>
<p>Also, there are more good tutorials at <a href="http://www.learningjquery.com/" target="_blank">learningjquery.com</a></p>



ADD TO<a href="#" onclick="javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();"><img src="http://img44.imageshack.us/img44/3714/picture4p.png" alt="Add To Evernote" /></a>  If this helps, why not tell your friends?


	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fbuild-a-simple-cost-estimator-with-jquery-ui-slider%2F&amp;title=Build%20a%20simple%20cost%20estimator%20with%20jQuery%20UI%20Slider" title="Reddit"><img src="http://design-notes.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fbuild-a-simple-cost-estimator-with-jquery-ui-slider%2F&amp;title=Build%20a%20simple%20cost%20estimator%20with%20jQuery%20UI%20Slider&amp;notes=I%20believe%20everyone%20is%20very%20familiar%20with%20jQury%20UI-JQuery%27s%20user%20interface%20add%20on.%20It%20is%20a%20great%20library%20and%20themes%20are%20quite%20fancy%2C%20but%20its%20lack%20of%20documentation%20often%20frustrate%20people%20especially%20beginners.Thats%20why%20I%20would%20like%20to%20write%20a%20simple%20tut" title="del.icio.us"><img src="http://design-notes.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fbuild-a-simple-cost-estimator-with-jquery-ui-slider%2F&amp;title=Build%20a%20simple%20cost%20estimator%20with%20jQuery%20UI%20Slider" title="StumbleUpon"><img src="http://design-notes.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fbuild-a-simple-cost-estimator-with-jquery-ui-slider%2F&amp;t=Build%20a%20simple%20cost%20estimator%20with%20jQuery%20UI%20Slider" title="Facebook"><img src="http://design-notes.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fbuild-a-simple-cost-estimator-with-jquery-ui-slider%2F" title="Technorati"><img src="http://design-notes.info/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.designfloat.com/submit.php?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fbuild-a-simple-cost-estimator-with-jquery-ui-slider%2F&amp;title=Build%20a%20simple%20cost%20estimator%20with%20jQuery%20UI%20Slider" title="Design Float"><img src="http://design-notes.info/wp-content/plugins/sociable/images/designfloat.png" title="Design Float" alt="Design Float" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fbuild-a-simple-cost-estimator-with-jquery-ui-slider%2F" title="Identi.ca"><img src="http://design-notes.info/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.friendfeed.com/share?title=Build%20a%20simple%20cost%20estimator%20with%20jQuery%20UI%20Slider&amp;link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fbuild-a-simple-cost-estimator-with-jquery-ui-slider%2F" title="FriendFeed"><img src="http://design-notes.info/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fbuild-a-simple-cost-estimator-with-jquery-ui-slider%2F&amp;submitHeadline=Build%20a%20simple%20cost%20estimator%20with%20jQuery%20UI%20Slider&amp;submitSummary=I%20believe%20everyone%20is%20very%20familiar%20with%20jQury%20UI-JQuery%27s%20user%20interface%20add%20on.%20It%20is%20a%20great%20library%20and%20themes%20are%20quite%20fancy%2C%20but%20its%20lack%20of%20documentation%20often%20frustrate%20people%20especially%20beginners.Thats%20why%20I%20would%20like%20to%20write%20a%20simple%20tut&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://design-notes.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fbuild-a-simple-cost-estimator-with-jquery-ui-slider%2F&amp;title=Build%20a%20simple%20cost%20estimator%20with%20jQuery%20UI%20Slider&amp;body=I%20believe%20everyone%20is%20very%20familiar%20with%20jQury%20UI-JQuery%27s%20user%20interface%20add%20on.%20It%20is%20a%20great%20library%20and%20themes%20are%20quite%20fancy%2C%20but%20its%20lack%20of%20documentation%20often%20frustrate%20people%20especially%20beginners.Thats%20why%20I%20would%20like%20to%20write%20a%20simple%20tut" title="Ping.fm"><img src="http://design-notes.info/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://design-notes.info/tutorial/jquery-tutorial/build-a-simple-cost-estimator-with-jquery-ui-slider/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to create a Feature Article slide show with thumbnails and indicator</title>
		<link>http://design-notes.info/tutorial/jquery-tutorial/how-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator/</link>
		<comments>http://design-notes.info/tutorial/jquery-tutorial/how-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 08:02:54 +0000</pubDate>
		<dc:creator>alexandra</dc:creator>
				<category><![CDATA[Feature Articles]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Gallery]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Slide show]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://design-notes.info/?p=659</guid>
		<description><![CDATA[I am a regular visitor of tutorial 9 among other popular design sites. I really love their gallery on the front page so I tried to figure out how they did it or How I can do it maybe in some other ways. I also like watch football (soccer to Americans) so Goal.com is my [...]]]></description>
			<content:encoded><![CDATA[<p>I am a regular visitor of tutorial 9 among other popular design sites. I really love their gallery on the front page so I tried to figure out how they did it or How I can do it maybe in some other ways. I also like watch football (soccer to Americans) so Goal.com is my favorite site too. They also got a news slide show on front page even with better features than tutorial9&#8217;s. You can also check out previous post about currently available <a href="http://design-notes.info/feature/13-simple-gallery-scripts/">slide show/gallery scripts .</a></p>
<div class="wp-caption alignnone" style="width: 383px"><img title="slideshow" src="http://design-notes.info/wp-content/uploads/2009/03/picture-8.png" alt="slideshow on Goal.com" width="373" height="489" /><p class="wp-caption-text">slideshow on Goal.com</p></div>
<p>Divs Explained</p>
<p><img class="alignnone size-full wp-image-677" title="feature-gallery-tutorial" src="http://design-notes.info/wp-content/uploads/2009/04/feature-gallery-tutorial.jpg" alt="feature-gallery-tutorial" width="724" height="427" /></p>
<p>Here is how I do the slide show similar to theirs.Two jQury plugins are needed: <a href="http://sorgalla.com/jcarousel/" target="_blank">jCarousel </a>and <a href="http://www.malsup.com/jquery/cycle/" target="_blank">jQuery cycle</a></p>
<p>First of all, the <strong>features</strong> I want to have:</p>
<ul>
<li><strong><span style="color: #000000;">Not to manually resize thumbnails</span></strong></li>
<li><strong><span style="color: #000000;">Be able to display photos with different size and ratio</span></strong></li>
<li><strong><span style="color: #000000;">Auto scroll with thumbnail indication</span></strong></li>
<li><strong><span style="color: #000000;">Manually scroll though thumbnails</span></strong></li>
<li><strong><span style="color: #000000;">Sliding effect with easing animation instead of fading</span></strong></li>
</ul>
<p>Here is the <a href="http://design-notes.info/wp-content/demo/slideshow/demo.html" target="_blank">Demo </a></p>
<p>You can also <a href="http://design-notes.info/wp-content/demo/slideshow.zip">download it</a></p>
<p>This is how I did it:</p>
<ol>
<li>Header:
<pre class="html"><span class="htmlScriptTag">&lt;script src=<span class="htmlAttributeValue">&quot;js/jquery-1.3.2.js&quot;</span> type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span>
<span class="htmlScriptTag">&lt;script src=<span class="htmlAttributeValue">&quot;js/jquery.jcarousel.pack.js&quot;</span> type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span>
<span class="htmlScriptTag">&lt;script src=<span class="htmlAttributeValue">&quot;js/cycle.js&quot;</span> type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span>
<span class="htmlScriptTag">&lt;script src=<span class="htmlAttributeValue">&quot;js/gallery.js&quot;</span> type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span>
//your future js file</pre>
</li>
<li>Slide show with jQuery cycle. According to <a href="http://www.malsup.com/jquery/cycle/int2.html" target="_blank">JQuery cycle&#8217;s intermedia level 2 tutorial</a>, having a slide show with pager and auto scroll is easy. Here is the HTML code:
<ul>
<li>Use DIV to hold your images.</li>
<li>Give your gallery a name- featured gallery.</li>
<li>Give images class &#8216;change&#8217; for resizing with CSS</li>
</ul>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;div id=”feature_gallery”&gt;
&lt;div class=”bigimg” title=”http://farm2.static.flickr.com/1429/1252247669_5f014e7dc1_b.jpg” id=”piknown printer took a galley of 1?&gt; &lt;img src=”http://farm2.static.flickr.com/1429/1252247669_5f014e7dc1_b.jpg” class=”change” &gt;&lt;/div&gt;
&lt;div class=”bigimg” title=”http://farm1.static.flickr.com/153/332584527_bd5efc0197_o.jpg” id=”picLorem Ipstext of tnpsum hadu typa type spec”&gt; &lt;img src=”http://farm1.static.flickr.com/153/332584527_bd5efc0197_o.jpg” class=”change” &gt;&lt;/div&gt;
&lt;div class=”bigimg” title=”http://farm4.static.flickr.com/3031/2744217176_33eeeef93a_b.jpg” id=”pum is simply dummy 3?&gt; &lt;img src=”http://farm4.static.flickr.com/3031/2744217176_33eeeef93a_b.jpg” class=”change” &gt;&lt;/div&gt;
&lt;div class=”bigimg” title=”http://farm4.static.flickr.com/3270/2694066431_009890dc49_o.jpg” id=”picg and typesetting industry. Lorem I 41?&gt; &lt;img src=”http://farm4.static.flickr.com/3270/2694066431_009890dc49_o.jpg” class=”change”&gt;&lt;/div&gt;
&lt;div class=”bigimg” title=”http://farm3.static.flickr.com/2053/2163474742_76d766fcfe_o.jpg” id=”ps been the industry’s standard 5?&gt; &lt;img src=”http://farm3.static.flickr.com/2053/2163474742_76d766fcfe_o.jpg” class=”change”&gt;&lt;/div&gt;
&lt;div class=”bigimg” title=”http://farm1.static.flickr.com/11/16167000_61729d3678_o.jpg” id=”picmmy text ever since the 1500s, when an un 6?&gt; &lt;img src=”http://farm1.static.flickr.com/11/16167000_61729d3678_o.jpg” class=”change”&gt;&lt;/div&gt;
&lt;div class=”bigimg” title=”http://farm4.static.flickr.com/3616/3429252806_7780e14125_o.jpg” id=”pihe printinpsum he and scrambled it to make ae 1?&gt; &lt;img src=”http://farm4.static.flickr.com/3616/3429252806_7780e14125_o.jpg” class=”change”&gt;&lt;/div&gt;
&lt;div class=”bigimg” title=”http://farm4.static.flickr.com/3337/3426057461_a4c7503e6f_o.jpg” id=”pihe printi1?&gt; &lt;img src=”http://farm4.static.flickr.com/3337/3426057461_a4c7503e6f_o.jpg” class=”change”&gt;&lt;/div&gt;
&lt;div class=”bigimg” title=”http://farm3.static.flickr.com/2062/2083550640_7545962dc7_o.jpg” id=”picture last one”&gt; &lt;img src=”http://farm3.static.flickr.com/2062/2083550640_7545962dc7_o.jpg” class=”change”&gt;&lt;/div&gt;
&lt;div id=”output”&gt;&lt;/div&gt;
&lt;/div&gt;</pre></td></tr></table></div>

</li>
<li>The JavaScript for jQuery Cycle:
<ul>
<li>Wrapall bigimgs.</li>
<li>Prepend ul named feature_gallery_pager before all bigimgs.</li>
<li> Define scroll effect and time</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#feature_gallery .bigimg'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">wrapAll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'
&lt;div class=&quot;bigimgs&quot;&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parents</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#feature_gallery'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">prepend</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'
&lt;ul id=&quot;feature_gallery_pager&quot; class=&quot;menu&quot;&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">cycle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
fx<span style="color: #339933;">:</span><span style="color: #3366CC;">'scrollLeft'</span><span style="color: #339933;">,</span>
easing<span style="color: #339933;">:</span> <span style="color: #3366CC;">'swing'</span><span style="color: #339933;">,</span>
inDelay<span style="color: #339933;">:</span>    <span style="color: #CC0000;">250</span><span style="color: #339933;">,</span>
drop<span style="color: #339933;">:</span>       <span style="color: #CC0000;">40</span><span style="color: #339933;">,</span>
timeout<span style="color: #339933;">:</span>    <span style="color: #CC0000;">5000</span><span style="color: #339933;">,</span>
pause<span style="color: #339933;">:</span>      <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
&nbsp;
slideExpr<span style="color: #339933;">:</span> <span style="color: #3366CC;">'.bigimg'</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">//slide name</span>
pager<span style="color: #339933;">:</span>      <span style="color: #3366CC;">'#feature_gallery_pager'</span><span style="color: #006600; font-style: italic;">//pager name</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>ul<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></div></div>

</li>
<li>I also want to have the caption or related text displayed. Then we need  a call back function. There are two choices. You can use onBefore or onAfter. There isn&#8217;t too much difference.<br />
<blockquote><p>The<code>before</code> option specifies the name of the callback function to be invoked<br />
immediately before a slide transition.  The <code>after</code> option specifies the name<br />
of the callback method to be invoked at the end of a slide transition.</p></blockquote>
<p>I will just use before.Also I stored captions or related texts in id attribute. You can always use somthing else.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#feature_gallery .bigimg'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">wrapAll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'
&lt;div class=&quot;bigimgs&quot;&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parents</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#feature_gallery'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">prepend</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'
&lt;ul id=&quot;feature_gallery_pager&quot; class=&quot;menu&quot;&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">cycle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
fx<span style="color: #339933;">:</span><span style="color: #3366CC;">'scrollLeft'</span><span style="color: #339933;">,</span>
easing<span style="color: #339933;">:</span> <span style="color: #3366CC;">'swing'</span><span style="color: #339933;">,</span>
inDelay<span style="color: #339933;">:</span>    <span style="color: #CC0000;">250</span><span style="color: #339933;">,</span>
drop<span style="color: #339933;">:</span>       <span style="color: #CC0000;">40</span><span style="color: #339933;">,</span>
timeout<span style="color: #339933;">:</span>    <span style="color: #CC0000;">5000</span><span style="color: #339933;">,</span>
pause<span style="color: #339933;">:</span>      <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
before<span style="color: #339933;">:</span>  onBefore<span style="color: #339933;">,</span><span style="color: #006600; font-style: italic;">//add call back function</span>
slideExpr<span style="color: #339933;">:</span> <span style="color: #3366CC;">'.bigimg'</span><span style="color: #339933;">,</span>
pager<span style="color: #339933;">:</span>      <span style="color: #3366CC;">'#feature_gallery_pager'</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #003366; font-weight: bold;">function</span> onBefore<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#output'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scrolling image:&quot;</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></div></div>

</li>
<li>Now we need to get thumbnails from bigimgs&#8217; url and shrink them. Add this code after pager name and define width and height for class thumbnail. What it does is to get src from bigimg&#8217;s title attribute. Now you understand why I put the image url in title attribute of its div, you can always use other attributes. Why not get it from src? cause it does not work, and I have seen many people stuck here. One guy in a forum used a whole page of code to get thumnail url. I think I just gonna take the shorcut.

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"> pagerAnchorBuilder<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>idx<span style="color: #339933;">,</span> slide<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
&nbsp;
            <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">'
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img class=&quot;thumb&quot; src=&quot;'</span><span style="color: #339933;">+</span>slide.<span style="color: #660066;">title</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span></pre></div></div>

</li>
<li>Put thumb nails in jCarousel, so we can scroll them.The thumbnails are called feature_gallery_pager  in jQuery cycle.

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<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>
jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#feature_gallery_pager'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">jcarousel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
<span style="color: #000066;">scroll</span><span style="color: #339933;">:</span><span style="color: #CC0000;">1</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></div></div>

</li>
<li>Style with CSS:
<ul>
<li>Define bigimg change class with width <strong>or</strong> height so they are not constrained.</li>
<li>class .jcarousel-item &#8217;s width need to be slightly smaller than it really is.</li>
<li>the active slide is called a.activeSlide</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
a img <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.jcarousel-container</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">510px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #993333;">auto</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">40px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.jcarousel-clip</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">2</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.jcarousel-list</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.jcarousel-item</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #808080; font-style: italic;">/* We set the width/height explicitly. No width/height causes infinite loops. */</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">80px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span><span style="color: #808080; font-style: italic;">/**
*  Horizontal Buttons
*/</span>
<span style="color: #6666ff;">.jcarousel-next-horizontal</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">32px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">32px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span>  <span style="color: #993333;">transparent</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">jcarousel_next.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.jcarousel-next-horizontal</span><span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-32px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.jcarousel-next-horizontal</span><span style="color: #3333ff;">:active</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-64px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.jcarousel-next-disabled-horizontal</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.jcarousel-next-disabled-horizontal</span><span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.jcarousel-next-disabled-horizontal</span><span style="color: #3333ff;">:active </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">default</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-96px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.jcarousel-prev-horizontal</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">32px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">32px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">jcarousel_prev.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.jcarousel-prev-horizontal</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-32px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.jcarousel-prev-horizontal</span><span style="color: #3333ff;">:active </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-64px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.jcarousel-prev-disabled-horizontal</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.jcarousel-prev-disabled-horizontal</span><span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.jcarousel-prev-disabled-horizontal</span><span style="color: #3333ff;">:active </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">default</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-96px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#feature_gallery</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">600px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#F2F2F2</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#DADADA</span><span style="color: #00AA00;">;</span>
border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
-webkit-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
-moz-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
ul<span style="color: #cc00cc;">#feature_gallery_pager</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">65px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#feature_gallery</span> ul<span style="color: #6666ff;">.menu</span> li a<span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">&#123;</span>//you can define sth here
<span style="color: #00AA00;">&#125;</span>
ul<span style="color: #cc00cc;">#feature_gallery_pager</span> li a<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">80px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">60px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
ul<span style="color: #cc00cc;">#feature_gallery_pager</span> li<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#feature_gallery</span> ul<span style="color: #6666ff;">.menu</span> a.activeSlide<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">arrow.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#feature_gallery</span> .bigimgs<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">330px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#feature_gallery</span> img.change<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#feature_gallery</span> img.thumb<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">80px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">51px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#output</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">1em</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #993333;">both</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

</li>
<li>Make the js external:

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// DOM Loaded</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> 
&nbsp;
    <span style="color: #006600; font-style: italic;">//init js styles</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'hasJS'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
    <span style="color: #006600; font-style: italic;">// homepage cycles</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#feature_gallery .bigimg'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">wrapAll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'
&lt;div class=&quot;bigimgs&quot;&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parents</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#feature_gallery'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">prepend</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'
&lt;ul id=&quot;feature_gallery_pager&quot; class=&quot;menu&quot;&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">cycle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
        fx<span style="color: #339933;">:</span><span style="color: #3366CC;">'scrollLeft'</span><span style="color: #339933;">,</span>
        easing<span style="color: #339933;">:</span> <span style="color: #3366CC;">'swing'</span><span style="color: #339933;">,</span>
        inDelay<span style="color: #339933;">:</span>    <span style="color: #CC0000;">250</span><span style="color: #339933;">,</span>
        drop<span style="color: #339933;">:</span>       <span style="color: #CC0000;">40</span><span style="color: #339933;">,</span>
        timeout<span style="color: #339933;">:</span>    <span style="color: #CC0000;">5000</span><span style="color: #339933;">,</span>
        pause<span style="color: #339933;">:</span>      <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
		before<span style="color: #339933;">:</span>  onBefore<span style="color: #339933;">,</span>
        slideExpr<span style="color: #339933;">:</span> <span style="color: #3366CC;">'.bigimg'</span><span style="color: #339933;">,</span>
        pager<span style="color: #339933;">:</span>      <span style="color: #3366CC;">'#feature_gallery_pager'</span><span style="color: #339933;">,</span>
        pagerAnchorBuilder<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>idx<span style="color: #339933;">,</span> slide<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
&nbsp;
            <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">'
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img class=&quot;thumb&quot; src=&quot;'</span><span style="color: #339933;">+</span>slide.<span style="color: #660066;">title</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> 
&nbsp;
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
$<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>
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#feature_gallery_pager'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">jcarousel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000066;">scroll</span><span style="color: #339933;">:</span><span style="color: #CC0000;">1</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>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> onBefore<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#output'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scrolling image:
&quot;</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> 	
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>ul<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></div></div>

</li>
<li>(optional) If your photos&#8217; size are very different you can define the image change class like this
<pre class="css"><span class="cssSelector">.change{</span><span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">600px</span><span class="cssRest">;</span>//make it bigger than your frame so you can move it <span class="cssProperty">position</span><span class="cssRest">:</span><span class="cssValue"> relative</span><span class="cssRest">;</span> <span class="cssProperty">top</span><span class="cssRest">:</span><span class="cssValue">-30px</span><span class="cssRest">;</span>left-40px<span class="cssSelector">}</span></pre>
</li>
</ol>
<p>Next, I will show you how to <a href="http://design-notes.info/tutorial/wordpress/integrate-feature-article-content-slide-show-into-wordpress/">integrate it with </a><a href="http://design-notes.info/tag/wordpress/">WordPress</a>.</p>



ADD TO<a href="#" onclick="javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();"><img src="http://img44.imageshack.us/img44/3714/picture4p.png" alt="Add To Evernote" /></a>  If this helps, why not tell your friends?


	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fhow-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator%2F&amp;title=How%20to%20create%20a%20Feature%20Article%20slide%20show%20with%20thumbnails%20and%20indicator" title="Reddit"><img src="http://design-notes.info/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fhow-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator%2F&amp;title=How%20to%20create%20a%20Feature%20Article%20slide%20show%20with%20thumbnails%20and%20indicator&amp;notes=I%20am%20a%20regular%20visitor%20of%20tutorial%209%20among%20other%20popular%20design%20sites.%20I%20really%20love%20their%20gallery%20on%20the%20front%20page%20so%20I%20tried%20to%20figure%20out%20how%20they%20did%20it%20or%20How%20I%20can%20do%20it%20maybe%20in%20some%20other%20ways.%20I%20also%20like%20watch%20football%20%28soccer%20to%20Americans" title="del.icio.us"><img src="http://design-notes.info/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fhow-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator%2F&amp;title=How%20to%20create%20a%20Feature%20Article%20slide%20show%20with%20thumbnails%20and%20indicator" title="StumbleUpon"><img src="http://design-notes.info/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fhow-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator%2F&amp;t=How%20to%20create%20a%20Feature%20Article%20slide%20show%20with%20thumbnails%20and%20indicator" title="Facebook"><img src="http://design-notes.info/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fhow-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator%2F" title="Technorati"><img src="http://design-notes.info/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.designfloat.com/submit.php?url=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fhow-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator%2F&amp;title=How%20to%20create%20a%20Feature%20Article%20slide%20show%20with%20thumbnails%20and%20indicator" title="Design Float"><img src="http://design-notes.info/wp-content/plugins/sociable/images/designfloat.png" title="Design Float" alt="Design Float" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fhow-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator%2F" title="Identi.ca"><img src="http://design-notes.info/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.friendfeed.com/share?title=How%20to%20create%20a%20Feature%20Article%20slide%20show%20with%20thumbnails%20and%20indicator&amp;link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fhow-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator%2F" title="FriendFeed"><img src="http://design-notes.info/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fhow-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator%2F&amp;submitHeadline=How%20to%20create%20a%20Feature%20Article%20slide%20show%20with%20thumbnails%20and%20indicator&amp;submitSummary=I%20am%20a%20regular%20visitor%20of%20tutorial%209%20among%20other%20popular%20design%20sites.%20I%20really%20love%20their%20gallery%20on%20the%20front%20page%20so%20I%20tried%20to%20figure%20out%20how%20they%20did%20it%20or%20How%20I%20can%20do%20it%20maybe%20in%20some%20other%20ways.%20I%20also%20like%20watch%20football%20%28soccer%20to%20Americans&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://design-notes.info/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fdesign-notes.info%2Ftutorial%2Fjquery-tutorial%2Fhow-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator%2F&amp;title=How%20to%20create%20a%20Feature%20Article%20slide%20show%20with%20thumbnails%20and%20indicator&amp;body=I%20am%20a%20regular%20visitor%20of%20tutorial%209%20among%20other%20popular%20design%20sites.%20I%20really%20love%20their%20gallery%20on%20the%20front%20page%20so%20I%20tried%20to%20figure%20out%20how%20they%20did%20it%20or%20How%20I%20can%20do%20it%20maybe%20in%20some%20other%20ways.%20I%20also%20like%20watch%20football%20%28soccer%20to%20Americans" title="Ping.fm"><img src="http://design-notes.info/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://design-notes.info/tutorial/jquery-tutorial/how-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
	</channel>
</rss>
