<?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>The Code Dreamer : Nitin Hayaran &#187; Uncategorized</title>
	<atom:link href="http://www.nitinh.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nitinh.com</link>
	<description>Nitin Hayaran&#039;s Blog</description>
	<lastBuildDate>Sun, 29 Jan 2012 07:28:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Energy Saving Javascript</title>
		<link>http://www.nitinh.com/2010/06/energy-saving-javascript/</link>
		<comments>http://www.nitinh.com/2010/06/energy-saving-javascript/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 18:30:38 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[black]]></category>
		<category><![CDATA[black-screen]]></category>
		<category><![CDATA[Effect]]></category>
		<category><![CDATA[energy]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/?p=483</guid>
		<description><![CDATA[TweetShareTitle of this post may seem strange to you but this is true, You can actually save some energy by using this Javascript on your website. Let me tell you how. This javascript turns the webpage black if there is no user activity on the page for some time. As the page predominantly turn black [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2010/03/beautiful-nag-screen-using-jquery-css3/' rel='bookmark' title='Permanent Link: Beautiful Nag Screen using JQuery &amp; CSS3'>Beautiful Nag Screen using JQuery &amp; CSS3</a></li>
<li><a href='http://www.nitinh.com/2009/02/wtf-what-the-framework-bookmarklet-find-the-javascript-framework-being-used/' rel='bookmark' title='Permanent Link: WTF : What the Framework bookmarklet : Find the javascript framework being used'>WTF : What the Framework bookmarklet : Find the javascript framework being used</a></li>
<li><a href='http://www.nitinh.com/2009/02/dictionary-on-double-click-bookmarklet/' rel='bookmark' title='Permanent Link: Dictionary on double click : BookMarklet'>Dictionary on double click : BookMarklet</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2010/06/energy-saving-javascript/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2010/06/energy-saving-javascript/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p><img class="size-full wp-image-485 alignleft" style="margin: 0 10px 10px 0;" title="Energy Saving Script" src="http://www.nitinh.com/wp-content/uploads/2010/06/black.jpg" alt="Energy Saving Script" width="191" height="191" />Title of this post may seem strange to you but this is true, You can actually save some energy by using this Javascript on your website. Let me tell you how.</p>
<p>This javascript turns the webpage black if there is no user activity on the page for some time. As the page predominantly turn black the script in-effect saves energy.</p>
<blockquote><p>Image displayed is primarily a function of the user's color settings and desktop graphics, as well as the color and size of open application windows; a given monitor requires more power to display a white (or light) screen than a black (or dark) screen.</p></blockquote>
<p>Roberson et al, 2002.</p>
<h2><span id="more-483"></span></h2>
<p>Just have a look at the Demo to see how it looks:</p>
<p><a class="button" href="/static/energy/">Energy Saving Javascript Demo</a></p>
<h2>How to Use</h2>
<p>Using this script is damn simple just place following script tag anywhere in the page. It would be good if you place this script just before <strong>&lt;/body&gt;</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://apps.nitinh.com/energy.js?time=100&amp;amp;credit=0&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<h3>Configuration</h3>
<p>There are two configurable parameters:</p>
<ul>
<li><strong>time</strong> : This is the amount of idle time before which the screen turn black. The time is in number of seconds and its value should be greater than 10.</li>
<li><strong>credit</strong> : This is boolean field to show / hide credits in Black Screen. Values could be 1 or 0</li>
</ul>
<p>Hope this script saves some of the valuable world energy.</p>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2010/03/beautiful-nag-screen-using-jquery-css3/' rel='bookmark' title='Permanent Link: Beautiful Nag Screen using JQuery &amp; CSS3'>Beautiful Nag Screen using JQuery &amp; CSS3</a></li>
<li><a href='http://www.nitinh.com/2009/02/wtf-what-the-framework-bookmarklet-find-the-javascript-framework-being-used/' rel='bookmark' title='Permanent Link: WTF : What the Framework bookmarklet : Find the javascript framework being used'>WTF : What the Framework bookmarklet : Find the javascript framework being used</a></li>
<li><a href='http://www.nitinh.com/2009/02/dictionary-on-double-click-bookmarklet/' rel='bookmark' title='Permanent Link: Dictionary on double click : BookMarklet'>Dictionary on double click : BookMarklet</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2010/06/energy-saving-javascript/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>WordPress Hacks : Export and Redirect Posts based on their Category</title>
		<link>http://www.nitinh.com/2010/03/wordpress-hacks-export-and-redirect-posts-based-on-their-category/</link>
		<comments>http://www.nitinh.com/2010/03/wordpress-hacks-export-and-redirect-posts-based-on-their-category/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 16:03:06 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[301Redirect]]></category>
		<category><![CDATA[Category]]></category>
		<category><![CDATA[Export]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Posts]]></category>
		<category><![CDATA[Redirect]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/2010/03/wordpress-hacks-export-and-redirect-posts-based-on-their-category/</guid>
		<description><![CDATA[TweetShare WordPress is an excellent blogging engine. It is easy to setup and even easier to use. It has got a huge collection of themes and plugins. Because of all these things WordPress has got so widespread use. WordPress has the concept of categories to segregate posts in different types.  When number of posts in [...]]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2010/03/wordpress-hacks-export-and-redirect-posts-based-on-their-category/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2010/03/wordpress-hacks-export-and-redirect-posts-based-on-their-category/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p><a href="http://www.nitinh.com/wp-content/uploads/2010/03/wordpress.jpg"><img style="margin: 0px 10px 10px 0px; float: left;" title="wordpress" src="http://www.nitinh.com/wp-content/uploads/2010/03/wordpress_thumb.jpg" border="0" alt="wordpress" width="204" height="204" align="left" /></a></p>
<p><a class="zem_slink" title="WordPress" rel="homepage" href="http://wordpress.org/">WordPress</a> is an excellent blogging engine. It is easy to setup and even easier to use. It has got a huge collection of themes and plugins. Because of all these things WordPress has got so widespread use.</p>
<p>WordPress has the concept of categories to segregate posts in different types.  When number of posts in some category becomes really huge, its good to make a separate website for this particular category.</p>
<p>I faced similar problem for one of my website and I decided to migrate all of my posts in “XYZ” category to a different domain. But, unfortunately WordPress Admin Dashboard doesn’t provide any direct method to export all posts in a particular category.</p>
<p><span id="more-477"></span></p>
<p>So, to perform such migration we’ll have to go through several steps. For better understanding we can basically divide this full migration in two steps:</p>
<ol>
<li>Export Posts / Comments based on its category</li>
<li>Redirect posts of this category</li>
</ol>
<h3>Export Posts based on its category</h3>
<p>WordPress admin panel is very rich, and it does provide direct method to export posts, pages, comments, custom fields, categories, and tags. But you can only export it based on its author, there isn’t any way based on category. So, basically what I did was :</p>
<ol>
<li>Create a new user “AUTHOR_1”</li>
<li>Change author of all the posts in category “CATEGORY_XYZ” to “AUTHOR_1”</li>
<li>Export posts of “AUTHOR_1”</li>
</ol>
<p>Step 1 and 3 are quite obvious and straight, the only challenge is with Step 2. The best way I felt was to dig into the <strong>WordPress database</strong> and change author on table level itself.</p>
<h4>Database Manipulation</h4>
<p>WordPress stores all posts in a table called <em>“wp_xxxxxx_posts”. </em>This table consists a column named “<em>post_author”. </em>So basically we’ll have to change this column for our posts. To do this just run following queries on your wordpress database.</p>
<p><strong>NOTE :</strong> Before running any query on database level, I’ll recommend you to take backup of the datebase.</p>
<h5>Get TERM_ID</h5>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span>  <span style="color: #ff0000;">`term_id`</span> <span style="color: #66cc66;">,</span>  <span style="color: #ff0000;">`name`</span> <span style="color: #66cc66;">,</span>  <span style="color: #ff0000;">`slug`</span>
<span style="color: #993333; font-weight: bold;">FROM</span>  <span style="color: #ff0000;">`wp_h8kac5_terms`</span>
<span style="color: #993333; font-weight: bold;">WHERE</span>  <span style="color: #ff0000;">`name`</span> <span style="color: #993333; font-weight: bold;">LIKE</span>  <span style="color: #ff0000;">'CATEGORY_XYZ'</span></pre></div></div>

<p>Here you'll have to note the "<strong>term_id</strong>" In following query put term_id taken form above query.</p>
<h5>Get TERM_TAXONOMY_ID</h5>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span>  <span style="color: #ff0000;">`term_taxonomy_id`</span> <span style="color: #66cc66;">,</span>  <span style="color: #ff0000;">`term_id`</span> <span style="color: #66cc66;">,</span>  <span style="color: #ff0000;">`taxonomy`</span> <span style="color: #66cc66;">,</span>  <span style="color: #ff0000;">`count`</span>
<span style="color: #993333; font-weight: bold;">FROM</span>  <span style="color: #ff0000;">`wp_h8kac5_term_taxonomy`</span>
<span style="color: #993333; font-weight: bold;">WHERE</span>  <span style="color: #ff0000;">`term_id`</span> <span style="color: #66cc66;">=</span> %term_id%
<span style="color: #993333; font-weight: bold;">AND</span> taxonomy <span style="color: #66cc66;">=</span>  <span style="color: #ff0000;">'category'</span></pre></div></div>

<p>Here you have to note <em>"term_taxonomy_id"</em>. Secondly you can see a column <em>"count"</em>, this count should be equal to the posts returned in :</p>
<p>http://www.example.com/wp-admin/edit.php?category_name=CATEGORY_XYZ</p>
<h5>Update AUTHOR_ID in Posts Table</h5>
<p>This is the final sql query to update author. Before this you need to find the user_id of the user we just created. This can be found in table "wp_h8kac5_users".</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_h8kac5_posts
<span style="color: #993333; font-weight: bold;">SET</span> post_author <span style="color: #66cc66;">=</span> %USER_ID%
<span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> object_id <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #ff0000;">`wp_h8kac5_term_relationships`</span> <span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">`term_taxonomy_id`</span> <span style="color: #66cc66;">=</span> %TERM_TAXONOMY_ID% <span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>You need to replace %TERM_TAXONOMY_ID% from the <em>"term_taxonomy_id" </em>returned from the previous query.</p>
<h4>Export Posts</h4>
<p>Hurry !! half the battle is won. We have changed author of all the desired posts. Now we just have to log on to admin panel and export the posts of this <strong>author</strong>. This can be done from:</p>
<p>http://www.example.com/wp-admin/export.php</p>
<h4>Imports Posts on New Domain</h4>
<p>Now log on to the admin dashboard of new domain and <strong>import</strong> these posts from:</p>
<p>http://www.example.com/wp-admin/import.php</p>
<p>At at this point we have done with export part of this migration process. Now the only thing left is to redirect these posts. For redirection we’ll use .htaccess rules.</p>
<h3>Redirect posts of the category</h3>
<p>On my website I have following permalink format :</p>
<pre>/%year%/%monthnum%/%category%/%postname%/</pre>
<p>So, basically “Category” is the 3rd parameter in my URL Scheme. You need to keep similar URL Scheme on your new website. According to this URL pattern we have to write a rule in <strong><a href="http://en.wikipedia.org/wiki/Htaccess" target="_blank">.htaccess</a></strong> file.</p>
<pre># BEGIN Redirection

RewriteEngine On
RewriteCond %{REQUEST_URI} ^(/\d{4}/\d{2}/)([^/]+)(/.*)$
RewriteCond %2 ^CATEGORY_XYZ$
RewriteRule ^(.*)$ http://www.new-domain.com/$1 [redirect=permanent,last]

# END Redirection</pre>
<p>Just put above code in starting of .htaccess, and you are all done.</p>
<p>You can test our implementation by visiting any post of “CATEGORY_XYZ”, it should be redirected to your new domain.</p>
<p>Feel free to shoot any queries through comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2010/03/wordpress-hacks-export-and-redirect-posts-based-on-their-category/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sexy Tooltip using CSS3 (no images)</title>
		<link>http://www.nitinh.com/2010/03/sexy-tooltip-using-css3/</link>
		<comments>http://www.nitinh.com/2010/03/sexy-tooltip-using-css3/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 08:45:59 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tooltip]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/2010/03/sexy-tooltip-using-css3/</guid>
		<description><![CDATA[TweetShareCSS is Awesome, but “CSS3” is Awesomely Awesome. With CSS3 we can make our pages even more beautiful without using additional images and extra markup. In this post I have tried to make tooltips using CSS3. This is just a sample implementation for tooltip, you can have even better variants. Here, this example is semantic HTML. [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2010/01/drop-shadow-in-images-no-extra-markup/' rel='bookmark' title='Permanent Link: Drop Shadow in Images : No extra markup'>Drop Shadow in Images : No extra markup</a></li>
<li><a href='http://www.nitinh.com/2010/03/beautiful-nag-screen-using-jquery-css3/' rel='bookmark' title='Permanent Link: Beautiful Nag Screen using JQuery &amp; CSS3'>Beautiful Nag Screen using JQuery &amp; CSS3</a></li>
<li><a href='http://www.nitinh.com/2009/10/beautiful-and-simple-buttons-with-css/' rel='bookmark' title='Permanent Link: Beautiful and Simple Buttons with CSS'>Beautiful and Simple Buttons with CSS</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2010/03/sexy-tooltip-using-css3/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2010/03/sexy-tooltip-using-css3/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p><img style="margin: 0px 10px; width: 150px; float: left;" src="http://imgur.com/ENdKM.jpg" alt="" />CSS is Awesome, but “CSS3” is Awesomely Awesome.</p>
<p>With CSS3 we can make our pages even more beautiful without using additional images and extra markup.</p>
<p>In this post I have tried to make tooltips using CSS3. This is just a sample implementation for tooltip, you can have even better variants.</p>
<p><span id="more-466"></span></p>
<p>Here, this example is semantic <abbr>HTML</abbr>. No empty elements, no unnecessary extra elements, no JavaScript, no images.</p>
<p>The inspiration for these tooltips is from the excellent attempt from “<a href="http://nicolasgallagher.com" target="_blank">Nicolas Gallagher</a>” in <a href="http://nicolasgallagher.com/demo/pure-css-speech-bubbles/bubbles.html" target="_blank">Pure CSS speech bubbles</a>.</p>
<p>Lets first head on to the demo for its actual effect.</p>
<p><a class="button" href="/static/tooltip/">Tooltip Demo</a></p>
<div class="wp-caption alignnone" style="width: 561px"><a href="http://www.nitinh.com/2010/03/sexy-tooltip-using-css3/"><img title="Tooltip using CSS3" src="http://imgur.com/V04da.jpg" alt="Tooltip using CSS3" width="551" height="155" /></a><p class="wp-caption-text">Tooltip using CSS3</p></div>
<p>Interested ??? Lets head on to its code</p>
<h3>HTML Markup</h3>
<p>The HTML used here is very simple, just add class”tooltip” and in title put tooltip text.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tooltip&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;This is first tooltip&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Link<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>

<h3>CSS Code</h3>
<p>The CSS for this effect utilizes :before and :after to show tooltip. Moreover box-shadow, gradient, border-radius properties of CSS3 are used to add some glare. Here is the code.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">a<span style="color: #6666ff;">.tooltip</span><span style="color: #3333ff;">:after</span><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: #cc66cc;">1.4</span> Arial<span style="color: #00AA00;">,</span>Georgia<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> attr<span style="color: #00AA00;">&#40;</span>title<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</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;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</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: #cc66cc;">0</span> <span style="color: #933;">3em</span><span style="color: #00AA00;">;</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;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#075698</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">-20px</span><span style="color: #00AA00;">;</span>
&nbsp;
	-moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>
	-webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>
	border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #3333ff;">:-webkit-</span>gradient<span style="color: #00AA00;">&#40;</span>linear<span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">,</span> from<span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#075698</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> to<span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#2e88c4</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #3333ff;">:-moz-linear-</span>gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#075698</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#2e88c4</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #3333ff;">:-o-linear-</span>gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#075698</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#2e88c4</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #3333ff;">:linear-</span>gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#075698</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#2e88c4</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
&nbsp;
	-moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">4px</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* FF3.5+ */</span>
	-webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">4px</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Saf3.0+, Chrome */</span>
	box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">4px</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Opera 10.5, IE 9.0 */</span>
	filter<span style="color: #00AA00;">:</span>  progid<span style="color: #3333ff;">:DXImageTransform</span><span style="color: #6666ff;">.Microsoft</span>.dropshadow<span style="color: #00AA00;">&#40;</span>OffX<span style="color: #00AA00;">=</span><span style="color: #933;">0px</span><span style="color: #00AA00;">,</span> OffY<span style="color: #00AA00;">=</span><span style="color: #933;">0px</span><span style="color: #00AA00;">,</span> Color<span style="color: #00AA00;">=</span><span style="color: #ff0000;">'#000'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* IE6,IE7 */</span>
	-ms-filter<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;progid:DXImageTransform.Microsoft.dropshadow(OffX=0px, OffY=0px, Color='#000')&quot;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* IE8 */</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* creates triangle */</span>
a<span style="color: #6666ff;">.tooltip</span><span style="color: #3333ff;">:before</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;">13</span><span style="color: #00AA00;">;</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;">content</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\0</span>0a0&quot;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">-3px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-width</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span> <span style="color: #933;">7px</span> <span style="color: #933;">15px</span> <span style="color: #933;">7px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-color</span><span style="color: #00AA00;">:</span><span style="color: #993333;">transparent</span> <span style="color: #993333;">transparent</span> <span style="color: #cc00cc;">#075698</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
a<span style="color: #6666ff;">.tooltip</span><span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">:</span><span style="color: #3333ff;">:before</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: #00AA00;">&#125;</span>
&nbsp;
a<span style="color: #6666ff;">.tooltip</span><span style="color: #3333ff;">:hover</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;">10</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>
&nbsp;
a<span style="color: #6666ff;">.tooltip</span><span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">:</span><span style="color: #3333ff;">:after</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;">200px</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;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">25px</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: #00AA00;">&#125;</span></pre></div></div>

<p>Hope you'll like it.</p>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2010/01/drop-shadow-in-images-no-extra-markup/' rel='bookmark' title='Permanent Link: Drop Shadow in Images : No extra markup'>Drop Shadow in Images : No extra markup</a></li>
<li><a href='http://www.nitinh.com/2010/03/beautiful-nag-screen-using-jquery-css3/' rel='bookmark' title='Permanent Link: Beautiful Nag Screen using JQuery &amp; CSS3'>Beautiful Nag Screen using JQuery &amp; CSS3</a></li>
<li><a href='http://www.nitinh.com/2009/10/beautiful-and-simple-buttons-with-css/' rel='bookmark' title='Permanent Link: Beautiful and Simple Buttons with CSS'>Beautiful and Simple Buttons with CSS</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2010/03/sexy-tooltip-using-css3/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Beautiful Nag Screen using JQuery &amp; CSS3</title>
		<link>http://www.nitinh.com/2010/03/beautiful-nag-screen-using-jquery-css3/</link>
		<comments>http://www.nitinh.com/2010/03/beautiful-nag-screen-using-jquery-css3/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 16:51:18 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[nag screen]]></category>
		<category><![CDATA[nagscreen]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/2010/03/beautiful-nag-screen-using-jquery-css3/</guid>
		<description><![CDATA[TweetShareYesterday I wrote about a beautiful implementation for nag screen using mootools and CSS3. Thanks for all of my visitor for showing interest in it. Considering requests from some of the users, I have also worked on its jQuery version. In jQuery version I have also tried to remove the bugs pointed out by one [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2010/03/beautiful-nag-screen-using-mootools-css3/' rel='bookmark' title='Permanent Link: Beautiful Nag Screen using Mootools &amp; CSS3'>Beautiful Nag Screen using Mootools &amp; CSS3</a></li>
<li><a href='http://www.nitinh.com/2010/03/how-to-create-a-simple-slideshow-using-mootools-jquery/' rel='bookmark' title='Permanent Link: How to Create a Simple Slideshow using Mootools / JQuery'>How to Create a Simple Slideshow using Mootools / JQuery</a></li>
<li><a href='http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/' rel='bookmark' title='Permanent Link: Vertical-Align : Middle Using Javascript : JQuery &#038; Mootools'>Vertical-Align : Middle Using Javascript : JQuery &#038; Mootools</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2010/03/beautiful-nag-screen-using-jquery-css3/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2010/03/beautiful-nag-screen-using-jquery-css3/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p><img style="margin: 0px 10px 10px 0px; width: 130px; float: left; height: 130px;" src="http://imgur.com/r4ZM4.jpg" alt="" align="left" />Yesterday I wrote about a <a href="http://www.nitinh.com/2010/03/beautiful-nag-screen-using-mootools-css3/">beautiful implementation for nag screen</a> using mootools and CSS3. Thanks for all of my visitor for showing interest in it.</p>
<p>Considering requests from some of the users, I have also worked on its jQuery version. In jQuery version I have also tried to remove the bugs pointed out by one of the user.</p>
<p><span id="more-457"></span></p>
<p>The new jQuery version also have following improvements:</p>
<ul>
<li>Close button can be used to close nag screen</li>
<li>Now the whole text doesn’t jumps when nag screen sticks to top</li>
</ul>
<p>thanks “<a href="http://www.nitinh.com/2010/03/beautiful-nag-screen-using-mootools-css3/comment-page-1/#comment-5693">Seeker</a>” for pointing out these bugs.</p>
<p>Head over to Demo and download the source for this page.</p>
<p><a class="button" href="http://www.nitinh.com/static/nagScreen/jquery.html" target="_blank">Demo of Nag Screen</a></p>
<p><a class="button" href="http://www.nitinh.com/static/nagScreen/nagScreen_jquery.rar">Download Nag Screen Code</a></p>
<p>Be sure to check out the <a href="http://www.nitinh.com/2010/03/beautiful-nag-screen-using-mootools-css3/">MooTools version</a>.</p>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2010/03/beautiful-nag-screen-using-mootools-css3/' rel='bookmark' title='Permanent Link: Beautiful Nag Screen using Mootools &amp; CSS3'>Beautiful Nag Screen using Mootools &amp; CSS3</a></li>
<li><a href='http://www.nitinh.com/2010/03/how-to-create-a-simple-slideshow-using-mootools-jquery/' rel='bookmark' title='Permanent Link: How to Create a Simple Slideshow using Mootools / JQuery'>How to Create a Simple Slideshow using Mootools / JQuery</a></li>
<li><a href='http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/' rel='bookmark' title='Permanent Link: Vertical-Align : Middle Using Javascript : JQuery &#038; Mootools'>Vertical-Align : Middle Using Javascript : JQuery &#038; Mootools</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2010/03/beautiful-nag-screen-using-jquery-css3/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to Create a Simple Slideshow using Mootools / JQuery</title>
		<link>http://www.nitinh.com/2010/03/how-to-create-a-simple-slideshow-using-mootools-jquery/</link>
		<comments>http://www.nitinh.com/2010/03/how-to-create-a-simple-slideshow-using-mootools-jquery/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 17:13:47 +0000</pubDate>
		<dc:creator>nitin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Gallery]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[Photo]]></category>
		<category><![CDATA[Slideshow]]></category>

		<guid isPermaLink="false">http://www.nitinh.com/2010/03/how-to-create-a-simple-slideshow-using-mootools-jquery/</guid>
		<description><![CDATA[TweetShare When we want to show lots of content in limited screen space, Slideshows comes to rescue. Making use of slideshows is the optimal way to present large amount of information. In this post i'll walk you through the process of making a very simple(minimilistic) slideshow using Mootools / Jquery. &#160; You must have seen [...]


Related posts:<ol><li><a href='http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/' rel='bookmark' title='Permanent Link: Vertical-Align : Middle Using Javascript : JQuery &#038; Mootools'>Vertical-Align : Middle Using Javascript : JQuery &#038; Mootools</a></li>
<li><a href='http://www.nitinh.com/2009/11/another-beautiful-thumbnail-hover-effect-using-mootools/' rel='bookmark' title='Permanent Link: Another Beautiful Thumbnail Hover Effect : Using Mootools'>Another Beautiful Thumbnail Hover Effect : Using Mootools</a></li>
<li><a href='http://www.nitinh.com/2010/03/beautiful-nag-screen-using-jquery-css3/' rel='bookmark' title='Permanent Link: Beautiful Nag Screen using JQuery &amp; CSS3'>Beautiful Nag Screen using JQuery &amp; CSS3</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button-left"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="socializeWP" data-url="http://www.nitinh.com/2010/03/how-to-create-a-simple-slideshow-using-mootools-jquery/">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="socialize-in-button-left"><a name="fb_share" type="box_count" share_url="http://www.nitinh.com/2010/03/how-to-create-a-simple-slideshow-using-mootools-jquery/" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div></div><p><img style="margin: 0px 10px 10px 0px; float: left" title="slide_show_icon" border="0" alt="slide_show_icon" align="left" src="http://www.nitinh.com/wp-content/uploads/2010/03/slide_show_icon.gif" width="132" height="132" /> When we want to show lots of content in limited screen space, Slideshows comes to rescue. Making use of slideshows is the optimal way to present large amount of information. In this post i'll walk you through the process of making a very simple(minimilistic) slideshow using Mootools / Jquery. </p>
<p><span id="more-439"></span></p>
<div id='extendedEntryBreak' name='extendedEntryBreak'></div>
<p>&#160;</p>
<p>You must have seen various types of slideshows around the web. Creating such slideshow is also very simple. With little smart code one can make it very quickly.</p>
<p>As it is said “<b><a href="http://en.wikipedia.org/wiki/A_picture_is_worth_a_thousand_words" target="_blank">A picture is worth a thousand words</a></b>”, similarly I believe a demo is worth a thousand words. So lets hit the demo and try it ourselves.</p>
<table border="0" cellspacing="0" cellpadding="0" width="500">
<tbody>
<tr>
<td valign="top" width="250">
<p align="center"><a class="button" href="/static/SlideShow/mootools.html" target="_blank">Demo using Mootools</a></p>
</td>
<td valign="top" width="250">
<p align="center"><a class="button" href="/static/SlideShow/jquery.html" target="_blank">Demo using JQuery</a></p>
</td>
</tr>
</tbody>
</table>
<p>So, Interested ??? Lets head over to its implementation.</p>
<h3>Action Plan</h3>
<ul>
<li><strong>Step 1 :</strong> HTML Code Markup </li>
<li><strong>Step 2 :</strong> Setup CSS for the Slideshow </li>
<li><strong>Step 3 :</strong> Javascript for getting desired effect </li>
</ul>
<h4>Step 1 : HTML code</h4>
<p>In this step we’ll make basic markup for the slideshow. This basically consists two parts, one which shows the bigger picture and second to show list of thumbnails. Here is the necessary HTML code for these two parts.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;bigPic&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/1.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/2.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/3.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/4.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/5.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/6.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/7.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/8.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/9.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/10.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;thumbs&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;active&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;1&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/1_thumb.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;2&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/3_thumb.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/4_thumb.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;4&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/5_thumb.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;5&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/6_thumb.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;6&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/7_thumb.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;7&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/8_thumb.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;8&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/9_thumb.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;9&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/10_thumb.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;10&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/2_thumb.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span></pre></div></div>

<p>Here fist div#bigPic contains all the big images in the slideshow. Whereas, the ul#thumbs contains thumbnails images. </p>
<h4>Step 2 : Necessary CSS Code</h4>
<p>This section shows, the necessary CSS code. CSS style used in demo for other styles are not included here.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#bigPic</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;">940px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</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;">#CCC</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;">#FFF</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#bigPic</span> img<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;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
ul<span style="color: #cc00cc;">#thumbs</span> li.active<span style="color: #00AA00;">&#123;</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;">#000</span><span style="color: #00AA00;">;</span>	
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</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: #00AA00;">&#125;</span>
ul<span style="color: #cc00cc;">#thumbs</span><span style="color: #00AA00;">,</span> ul<span style="color: #cc00cc;">#thumbs</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: #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;">list-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul<span style="color: #cc00cc;">#thumbs</span> li<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;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">7px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</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;">#CCC</span><span style="color: #00AA00;">;</span>	
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</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: #00AA00;">&#125;</span>
ul<span style="color: #cc00cc;">#thumbs</span> img<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;">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;">80px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">80px</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;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>		
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<h4>Step 3 : Javascript Magic</h4>
<p>The basic idea to get the effect is in following steps:</p>
<ol>
<li>Increase the z-index of current shown image</li>
<li>Show next image to be shown just below current image.</li>
<li>Now using fade out current image. This way next image will become visible.</li>
</ol>
<p>Equivalent JS code used is as follows.</p>
<h5>Using Mootools</h5>
<p>If you use JQuery directly head on to next section with JQuery code.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> currentImage<span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> currentIndex <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> interval<span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">function</span> showImage<span style="color: #009900;">&#40;</span>index<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>index<span style="color: #339933;">&lt;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'bigPic'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getElements</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'img'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> indexImage <span style="color: #339933;">=</span> $$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#bigPic img'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>currentImage<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>   
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>currentImage <span style="color: #339933;">!=</span> indexImage <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                $<span style="color: #009900;">&#40;</span>currentImage<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'z-index'</span><span style="color: #339933;">,</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                $clear<span style="color: #009900;">&#40;</span>myTimer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003366; font-weight: bold;">var</span> myFx <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Fx.<span style="color: #660066;">Tween</span><span style="color: #009900;">&#40;</span>currentImage<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
                    duration<span style="color: #339933;">:</span> <span style="color: #CC0000;">250</span><span style="color: #339933;">,</span>
                    onComplete<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: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setStyles</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'none'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'z-index'</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>
                        myTimer <span style="color: #339933;">=</span> showNext.<span style="color: #660066;">delay</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">3000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span>currentImage<span style="color: #009900;">&#41;</span>
                <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">start</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: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        indexImage.<span style="color: #660066;">setStyles</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'block'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'opacity'</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>
        currentImage <span style="color: #339933;">=</span> indexImage<span style="color: #339933;">;</span>
        currentIndex <span style="color: #339933;">=</span> index<span style="color: #339933;">;</span>
        $$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#thumbs li'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#thumbs li'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> showNext<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> len <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'bigPic'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getElements</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'img'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> next <span style="color: #339933;">=</span> currentIndex <span style="color: #339933;">&lt;</span> <span style="color: #009900;">&#40;</span>len<span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> currentIndex <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
    showImage<span style="color: #009900;">&#40;</span>next<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> myTimer<span style="color: #339933;">;</span>
window.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'domready'</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>
    myTimer <span style="color: #339933;">=</span> showNext.<span style="color: #660066;">delay</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">3000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    showNext<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//loads first image</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'thumbs'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getElements</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> count <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'rel'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        showImage<span style="color: #009900;">&#40;</span>parseInt<span style="color: #009900;">&#40;</span>count<span style="color: #009900;">&#41;</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: #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>

<h5>JQuery Implementation</h5>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> currentImage<span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> currentIndex <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> interval<span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">function</span> showImage<span style="color: #009900;">&#40;</span>index<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>index <span style="color: #339933;">&lt;</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#bigPic img'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> indexImage <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#bigPic img'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>currentImage<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>   
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>currentImage <span style="color: #339933;">!=</span> indexImage <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                $<span style="color: #009900;">&#40;</span>currentImage<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'z-index'</span><span style="color: #339933;">,</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                clearTimeout<span style="color: #009900;">&#40;</span>myTimer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                $<span style="color: #009900;">&#40;</span>currentImage<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeOut</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">250</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>
                    myTimer <span style="color: #339933;">=</span> setTimeout<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;showNext()&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">3000</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;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'none'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'z-index'</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: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        $<span style="color: #009900;">&#40;</span>indexImage<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'block'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'opacity'</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>
        currentImage <span style="color: #339933;">=</span> indexImage<span style="color: #339933;">;</span>
        currentIndex <span style="color: #339933;">=</span> index<span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#thumbs li'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#thumbs li'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> showNext<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> len <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#bigPic img'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> next <span style="color: #339933;">=</span> currentIndex <span style="color: #339933;">&lt;</span> <span style="color: #009900;">&#40;</span>len<span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> currentIndex <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
    showImage<span style="color: #009900;">&#40;</span>next<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> myTimer<span style="color: #339933;">;</span>
&nbsp;
$<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>
    myTimer <span style="color: #339933;">=</span> setTimeout<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;showNext()&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">3000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    showNext<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//Load first image</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#thumbs li'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> count <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;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'rel'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        showImage<span style="color: #009900;">&#40;</span>parseInt<span style="color: #009900;">&#40;</span>count<span style="color: #009900;">&#41;</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: #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>

<p>I have tried to keep the javascript code really simple if you still feel it difficult to understand just drop a comment about it. I'll try to explain your doubts.</p>
<h3>Download Code</h3>
<p>JQuery Implementation : <a href="/static/SlideShow/SlideShow-JQuery.zip" target="_blank"><strong>Sideshow-Jquery.zip</strong></a><br />
Mootools Implementation : <a href="/static/SlideShow/SlideShow-Mootools.zip" target="_blank"><strong>Sideshow-Mootools.zip</strong></a></p>


<p>Related posts:<ol><li><a href='http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/' rel='bookmark' title='Permanent Link: Vertical-Align : Middle Using Javascript : JQuery &#038; Mootools'>Vertical-Align : Middle Using Javascript : JQuery &#038; Mootools</a></li>
<li><a href='http://www.nitinh.com/2009/11/another-beautiful-thumbnail-hover-effect-using-mootools/' rel='bookmark' title='Permanent Link: Another Beautiful Thumbnail Hover Effect : Using Mootools'>Another Beautiful Thumbnail Hover Effect : Using Mootools</a></li>
<li><a href='http://www.nitinh.com/2010/03/beautiful-nag-screen-using-jquery-css3/' rel='bookmark' title='Permanent Link: Beautiful Nag Screen using JQuery &amp; CSS3'>Beautiful Nag Screen using JQuery &amp; CSS3</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.nitinh.com/2010/03/how-to-create-a-simple-slideshow-using-mootools-jquery/feed/</wfw:commentRss>
		<slash:comments>82</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
