<?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>Codrops &#187; slider</title>
	<atom:link href="http://tympanus.net/codrops/tag/slider/feed/" rel="self" type="application/rss+xml" />
	<link>http://tympanus.net/codrops</link>
	<description>Useful resources and inspiration for creative minds</description>
	<lastBuildDate>Mon, 06 Feb 2012 07:30:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Elastislide &#8211; A Responsive jQuery Carousel Plugin</title>
		<link>http://tympanus.net/codrops/2011/09/12/elastislide-responsive-carousel/</link>
		<comments>http://tympanus.net/codrops/2011/09/12/elastislide-responsive-carousel/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 17:02:45 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[fluid]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[responsive]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[thumbnails]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=5677</guid>
		<description><![CDATA[With the responsive awakening in web design it becomes important to not only take care of the visual part of a website but also of the functionality. Elastislide is a responsive jQuery carousel that will adapt its size and its behavior in order to work on any screen size. Inserting the carousels structure into a container with a fluid width will also make the carousel fluid. ]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Development/Elastislide/" title="Elastislide" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/09/elastislide.jpg" alt="" title="Elastislide" width="580" height="315" class="aligncenter size-full wp-image-5680" /></a></p>
<p><a class="demo" href="http://tympanus.net/Development/Elastislide/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Development/Elastislide/Elastislide.zip">Download source</a></p>
<p>With the responsive awakening in web design it becomes important to not only take care of the visual part of a website but also of the functionality. Elastislide is a responsive jQuery carousel that will adapt its size and its behavior in order to work on any screen size. Inserting the carousel&#8217;s structure into a container with a fluid width will also make the carousel fluid. </p>
<p>In a carousel, one could think that simply making its container &#8220;shorter&#8221; will solve the problem on smaller screens, but in some cases (e.g. when we have bigger images) it might be reasonable to resize the items as well. This and other options are part of Elastislide&#8217;s properties.</p>
<p>Elastislide uses the <a href="http://www.netcu.de/jquery-touchwipe-iphone-ipad-library" target="_blank">jQuery Touchwipe Plugin</a> which allows you to obtain the wipe event on an iPhone, iPad or iPod Touch. </p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<p>The images are by Karrie Nodalo and you can find her awesome photos here:<br />
<a href="http://www.flickr.com/photos/karrienodalo/" target="_blank">Karrie Nodalo&#8217;s Photostream on Flickr</a><br />
Her images are licensed under the <a target="_blank" href="http://creativecommons.org/licenses/by/2.0/deed.en_GB">Attribution 2.0 Generic License</a>.</p>
<h3>The HTML Structure</h3>
<p>The Markup for the carousel consists of a main wrapper that will adjust to the width of any fluid container you put it into. (If you put the carousel in a container with a fixed width, it will not adapt. So make sure that your container has a fluid layout.)<br />
The carousel element will have an unordered list with linked images:</p>
<pre class="brush:xml">
&lt;div id="carousel" class="es-carousel-wrapper"&gt;
	&lt;div class="es-carousel"&gt;
		&lt;ul&gt;
			&lt;li&gt;
				&lt;a href="#"&gt;
					&lt;img src="images/medium/1.jpg" alt="image01" /&gt;
				&lt;/a&gt;
			&lt;/li&gt;
			&lt;li&gt;...&lt;/li&gt;
			...
		&lt;/ul&gt;
	&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>Use your preferred ID and call the plugin like this:</p>
<pre class="brush:js">
$('#carousel').elastislide({
	imageW 	: 180
});
</pre>
<p>where <strong>imageW</strong> is the width of the thumbnails.</p>
<h3>Options</h3>
<p>Elastislide has the following default options:</p>
<pre class="brush:js">
speed		: 450,
// animation speed

easing		: '',
// animation easing effect

imageW		: 190,
// the images width

margin		: 3,
// image margin right

border		: 2,
// image border

minItems	: 1,
// the minimum number of items to show.
// when we resize the window, this will
// make sure minItems are always shown
// (unless of course minItems is higher
// than the total number of elements)

current		: 0,
// index of the current item
// when we resize the window,
// the plugin will make sure that
// this item is visible 

onClick		: function() { return false; }
// click item callback
// Example of how to get the index
// of the clicked element:
/*
$('#carousel').elastislide({
    onClick  :  function( $item ) {
        alert( 'The clicked item´s index is ' + $item.index() )
    }
});
*/
</pre>
<p>It is also possible to dynamically add new items to the carousel. The following is an example on how to achieve that:</p>
<pre class="brush:js">
var $items	= $('&lt;li&gt;&lt;a href="#"&gt;&lt;img src="images/large/1.jpg" alt="image01" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#"&gt;&lt;img src="images/large/2.jpg" alt="image01" /&gt;&lt;/a&gt;&lt;/li&gt;');
$('#carousel').append($items).elastislide( 'add', $items );
</pre>
<p>I hope you like this plugin and find it useful!</p>
<p><a class="demo" href="http://tympanus.net/Development/Elastislide/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Development/Elastislide/Elastislide.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/09/12/elastislide-responsive-carousel/feed/</wfw:commentRss>
		<slash:comments>75</slash:comments>
		</item>
		<item>
		<title>Slicebox &#8211; A fresh 3D image slider with graceful fallback</title>
		<link>http://tympanus.net/codrops/2011/09/05/slicebox-3d-image-slider/</link>
		<comments>http://tympanus.net/codrops/2011/09/05/slicebox-3d-image-slider/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 16:40:59 +0000</pubDate>
		<dc:creator>Pedro Botelho</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[fallback]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[transform]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=5657</guid>
		<description><![CDATA[With the CSS3 3D transformations we can create some neat effects by transforming elements in three-dimensional space. Slicebox makes use of the 3D transforms properties and allows different kind of effects. The main idea is to create three-dimensional image slices that will rotate and reveal the next image as another side of the 3d object. In case the browser does not support 3D transformations, a simple slider will be used as fallback.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Development/Slicebox/" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/09/slicebox.jpg" alt="" title="Slicebox" width="580" height="315" class="aligncenter size-full wp-image-5659" /></a><br />
<a class="demo" href="http://tympanus.net/Development/Slicebox/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Development/Slicebox/Slicebox.zip">Download source</a></p>
<p>With the CSS3 3D transformations we can create some neat effects by transforming elements in three-dimensional space. Slicebox makes use of the 3D transforms properties and allows different kind of effects. The main idea is to create three-dimensional image slices that will rotate and reveal the next image as another side of the 3d object. In case the browser does not support 3D transformations, a simple slider will be used as fallback.</p>
<p>Please note that you can only see the cool 3d effect of Slicebox in a browser that supports those CSS3 properties (currently Chrome and Safari). </p>
<p>The images used in the demos are by <a title="Flickr Photostream of Rick Harris" href="http://www.flickr.com/photos/rickharris/" target="_blank">Rick Harris</a>. They are licensed under the <a title="Images licensed under CC BY-SA 2.0" href="http://creativecommons.org/licenses/by-sa/2.0/deed.en_GB" target="_blank">Attribution-ShareAlike 2.0 Generic (CC BY-SA 2.0)</a>.</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>Usage</h3>
<p>In order to use Slicebox, put your images in a container with the class &#8220;sb-slider&#8221;:</p>
<pre class="brush:xml">
&lt;div id="sb-slider" class="sb-slider"&gt;
	&lt;img src="images/1.jpg" title="Creative Lifesaver"/&gt;
	&lt;img src="images/2.jpg" title="Honest Entertainer"/&gt;
	&lt;img src="images/3.jpg" title="Brave Astronaut"/&gt;
	&lt;img src="images/4.jpg" title="Affectionate Decision Maker"/&gt;
	&lt;img src="images/5.jpg" title="Faithful Investor"/&gt;
	&lt;img src="images/6.jpg" title="Groundbreaking Artist"/&gt;
	&lt;img src="images/7.jpg" title="Selfless Philantropist"/&gt;
&lt;/div&gt;
</pre>
<p>Then you can call the plugin with</p>
<pre class="brush:js">
$('#sb-slider').slicebox();
</pre>
<h3>Options</h3>
<p>Slicebox comes with a set of options that you can adjust for various types of effects:</p>
<pre class="brush:js">
orientation			: 'v',
// (v)ertical or (h)orizontal.

perspective			: 1200,
// -webkit-perspective value.

slicesCount			: 1,
// needs to be an odd number between 1 and 15
// (if you want the limit higher, change the _validate function).

disperseFactor		: 0,
// each slice will move x pixels left / top (depending on orientation).
// The middle slice doesn't move.
// The middle slice's neighbors will move disperseFactor pixels.

colorHiddenSides	: '#222',
// color of the hidden sides.

sequentialRotation	: false,
// the animation will start from left to right.
// The left most slice will be the first one to rotate.

sequentialFactor	: 0,
// if sequentialRotation is true this will
// be the interval between each rotation in ms.

speed3d				: 800,
// animation speed3d.

speed				: 600,
// fallback speed. You might want to set
// a different speed for the fallback animation...

fallbackEasing		: 'easeOutExpo',
// fallback easing.

slideshow			: false,
// if true the box will be rotating automatically.

slideshowTime		: 2000
// interval for the slideshow in ms.
</pre>
<p>Check out each example and you will see how to create different behaviors with the options.</p>
<p>Hope you find it useful, feedback is welcome!</p>
<p><a class="demo" href="http://tympanus.net/Development/Slicebox/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Development/Slicebox/Slicebox.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/09/05/slicebox-3d-image-slider/feed/</wfw:commentRss>
		<slash:comments>129</slash:comments>
		</item>
		<item>
		<title>Circular Content Carousel with jQuery</title>
		<link>http://tympanus.net/codrops/2011/08/16/circular-content-carousel/</link>
		<comments>http://tympanus.net/codrops/2011/08/16/circular-content-carousel/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 16:19:39 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[circular]]></category>
		<category><![CDATA[content slider]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[slider]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=5478</guid>
		<description><![CDATA[Today we want to share a simple circular content carousel with you. The idea is to have some content boxes that we can slide infinitely (circular). When clicking on the "more" link, the respective item moves to the left and a content area will slide out. Now we can navigate through the carousel where each step will reveal the next or previous content box with its expanded content. Clicking on the closing cross will slide the expanded content area back in and animate the item to its original position.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Development/CircularContentCarousel/" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/08/CircularContentCarousel.jpg" alt="" title="CircularContentCarousel" width="580" height="315" class="aligncenter size-full wp-image-5487" /></a><br />
<a class="demo" href="http://tympanus.net/Development/CircularContentCarousel/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Development/CircularContentCarousel/CircularContentCarousel.zip">Download source</a></p>
<p>Today we want to share a simple circular content carousel with you. The idea is to have some content boxes that we can slide infinitely (circular). When clicking on the &#8220;more&#8221; link, the respective item moves to the left and a content area will slide out. Now we can navigate through the carousel where each step will reveal the next or previous content box with its expanded content. Clicking on the closing cross will slide the expanded content area back in and animate the item to its original position.</p>
<p>The beautiful animal icon set in the ZIP file are by <a href="http://cyberella74.deviantart.com/art/Archigraphs-Animals-Icons-139629985" target="_blank">Cyberella</a> and they are licensed under the <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/" target="_blank">Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0) License</a>.</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The HTML Structure</h3>
<p>The structure consists of a main container and a wrapper for the items. Each item contains </p>
<pre class="brush:xml">
&lt;div id="ca-container" class="ca-container"&gt;
	&lt;div class="ca-wrapper"&gt;
		&lt;div class="ca-item ca-item-1"&gt;
			&lt;div class="ca-item-main"&gt;
				&lt;div class="ca-icon"&gt;&lt;/div&gt;
				&lt;h3&gt;Stop factory farming&lt;/h3&gt;
				&lt;h4&gt;
					&lt;span class="ca-quote"&gt;&ldquo;&lt;/span&gt;
					&lt;span&gt;Some text...&lt;/span&gt;
				&lt;/h4&gt;
					&lt;a href="#" class="ca-more"&gt;more...&lt;/a&gt;
			&lt;/div&gt;
			&lt;div class="ca-content-wrapper"&gt;
				&lt;div class="ca-content"&gt;
					&lt;h6&gt;Animals are not commodities&lt;/h6&gt;
					&lt;a href="#" class="ca-close"&gt;close&lt;/a&gt;
					&lt;div class="ca-content-text"&gt;
						&lt;p&gt;Some more text...&lt;/p&gt;
					&lt;/div&gt;
					&lt;ul&gt;
						&lt;li&gt;&lt;a href="#"&gt;Read more&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Share this&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Become a member&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Donate&lt;/a&gt;&lt;/li&gt;
					&lt;/ul&gt;
				&lt;/div&gt;
			&lt;/div&gt;
		&lt;/div&gt;
		&lt;div class="ca-item ca-item-2"&gt;
			...
		&lt;/div&gt;
		...
	&lt;/div&gt;&lt;!-- ca-wrapper --&gt;
&lt;/div&gt;&lt;!-- ca-container --&gt;
</pre>
<p>The initial view of the content carousel:<br />
<img src="http://tympanus.net/codrops/wp-content/uploads/2011/08/CircularContentCarousel1.jpg" alt="" title="CircularContentCarousel1" width="580" height="252" class="aligncenter size-full wp-image-5485" /></p>
<p>When we click on &#8220;more&#8230;&#8221;, another content area will slide out and move the respective item to the left:<br />
<img src="http://tympanus.net/codrops/wp-content/uploads/2011/08/CircularContentCarousel2.jpg" alt="" title="CircularContentCarousel2" width="580" height="252" class="aligncenter size-full wp-image-5486" /></p>
<p>The default options are the following:</p>
<pre class="brush:js">
$('#ca-container').contentcarousel({
	// speed for the sliding animation
	sliderSpeed		: 500,
	// easing for the sliding animation
	sliderEasing	: 'easeOutExpo',
	// speed for the item animation (open / close)
	itemSpeed		: 500,
	// easing for the item animation (open / close)
	itemEasing		: 'easeOutExpo',
	// number of items to scroll at a time
	scroll			: 1
});
</pre>
<p>We hope you enjoy this simple carousel and find it useful!</p>
<p><a class="demo" href="http://tympanus.net/Development/CircularContentCarousel/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Development/CircularContentCarousel/CircularContentCarousel.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/08/16/circular-content-carousel/feed/</wfw:commentRss>
		<slash:comments>127</slash:comments>
		</item>
		<item>
		<title>Content Rotator with jQuery</title>
		<link>http://tympanus.net/codrops/2011/07/29/content-rotator/</link>
		<comments>http://tympanus.net/codrops/2011/07/29/content-rotator/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 15:44:03 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[autoplay]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[rotator]]></category>
		<category><![CDATA[slider]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=5386</guid>
		<description><![CDATA[Today we want to share a fancy content rotator with you. It shows some image with a headline and sub-headline in each slide and allows navigating through the slides using the thumbnails that also contain a headline. Hiding the thumbnails will reveal a scrollable text container and the navigation arrows will move up so that one can navigate to the previous or next slides. ]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Development/ContentRotator/example1.html" title="Content Rotator with jQuery" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/07/contentRotator.jpg" alt="" title="contentRotator" width="580" height="315" class="aligncenter size-full wp-image-5388" /></a><br />
<a class="demo" href="http://tympanus.net/Development/ContentRotator/example1.html" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Development/ContentRotator/ContentRotator.zip">Download source</a></p>
<p>Today we want to share a fancy content rotator with you. It shows some image with a headline and sub-headline in each slide and allows navigating through the slides using the thumbnails that also contain a headline. Hiding the thumbnails will reveal a scrollable text container and the navigation arrows will move up so that one can navigate to the previous or next slides. </p>
<p>The beautiful images are by <a href="http://www.behance.net/gallery/Pretty-woman/1486807" title="Pretty Woman by Andrey and Lili" target="_blank">Andrey &#038; Lili</a>. The images are licensed under the <a href="http://creativecommons.org/licenses/by-nc/3.0/" title="Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0)" target="_blank">Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0) License</a>.</p>
<p>We also use the <a href="http://brandonaaron.net/code/mousewheel/docs" title="jQuery Mousewheel Plugin Documentation" target="_blank">jQuery Mousewheel Plugin by Brandon Aaron</a> and the <a href="http://jscrollpane.kelvinluck.com/" title="jScrollPane" target="_blank">jScrollPane Plugin</a> by <a href="http://www.kelvinluck.com/" title="Kevin Luck" target="_blank">Kevin Luck</a>.</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>Examples</h3>
<p>We have two examples, one with autoplay and one without:</p>
<ul>
<li><a href="http://tympanus.net/Development/ContentRotator/example2.html" target="_blank">Example with autoplay</a></li>
<li><a href="http://tympanus.net/Development/ContentRotator/example1.html" target="_blank">Example without autoplay</a></li>
</ul>
<p>For the HTML structure we will have a main container, the content wrapper and the container for the thumbs. Each cr-content-container needs an ID assigned which we will reference in each thumb with <strong>data-content</strong>:</p>
<pre class="brush:xml">
&lt;div class="cr-container" id="cr-container"&gt;
	&lt;div class="cr-content-wrapper" id="cr-content-wrapper"&gt;
		&lt;div class="cr-content-container" id="content-1" style="display:block;"&gt;
			&lt;img src="images/1.jpg"class="cr-img"/&gt;
			&lt;div class="cr-content"&gt;
				&lt;div class="cr-content-headline"&gt;
					&lt;h2&gt;The slide title&lt;/h2&gt;
					&lt;h3&gt;
						&lt;span&gt;Some sub-title&lt;/span&gt;
						&lt;a href="#" class="cr-more-link"&gt; read more &rarr;&lt;/a&gt;
					&lt;/h3&gt;
				&lt;/div&gt;
				&lt;div class="cr-content-text"&gt;
					&lt;p&gt;Some text here...&lt;/p&gt;
				&lt;/div&gt;
			&lt;/div&gt;&lt;!-- cr-content --&gt;
		&lt;/div&gt;&lt;!-- cr-content-container --&gt;
		&lt;div class="cr-content-container" id="content-2"&gt;
			...
		&lt;/div&gt;&lt;!-- cr-content-container --&gt;
		...
	&lt;/div&gt;&lt;!-- cr-content-wrapper --&gt;
	&lt;div class="cr-thumbs"&gt;
		&lt;div data-content="content-1" class="cr-selected"&gt;
			&lt;img src="images/thumbs/1.jpg"/&gt;
			&lt;h4&gt;The slide title&lt;/h4&gt;
		&lt;/div&gt;
		&lt;div data-content="content-2"&gt;
			&lt;img src="images/thumbs/2.jpg"/&gt;
			&lt;h4&gt;Another slide title&lt;/h4&gt;
		&lt;/div&gt;
		...
	&lt;/div&gt;&lt;!-- cr-thumbs --&gt;
&lt;/div&gt;&lt;!-- cr-container --&gt;
</pre>
<p>The default options are the following:</p>
<pre class="brush:js">
$('#cr-container').crotator({
	// slideshow on
	autoplay 			: false,
	// slideshow interval
	slideshow_interval 	: 3000,
	// if true the thumbs will be shown initially
	openThumbs			: true,
	// speed that the thumbs are shown / hidden
	toggleThumbsSpeed	: 300
});
</pre>
<p>We hope you like this little content rotator and find it useful!</p>
<p><a class="demo" href="http://tympanus.net/Development/ContentRotator/example1.html" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Development/ContentRotator/ContentRotator.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/07/29/content-rotator/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>Rotating Image Slider with jQuery</title>
		<link>http://tympanus.net/codrops/2011/04/28/rotating-image-slider/</link>
		<comments>http://tympanus.net/codrops/2011/04/28/rotating-image-slider/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 15:32:06 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[rotating]]></category>
		<category><![CDATA[rotation]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[transform]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=4701</guid>
		<description><![CDATA[View demo Download source In the following tutorial we will create an asymmetrical image slider with a little twist: when sliding the pictures we will slightly rotate them and delay the sliding of each element. The unusual shape of the slider is created by some elements placement and the use of thick borders. We will [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://tympanus.net/Tutorials/RotatingImageSlider/"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/04/RotatingImageSlider.jpg" alt="" title="RotatingImageSlider" width="580" height="315" class="aligncenter size-full wp-image-4704" /></a><br />
<a class="demo" href="http://tympanus.net/Tutorials/RotatingImageSlider/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/RotatingImageSlider/RotatingImageSlider.zip">Download source</a></p>
<p>In the following tutorial we will create an asymmetrical image slider with a little twist: when sliding the pictures we will slightly rotate them and delay the sliding of each element. The unusual shape of the slider is created by some elements placement and the use of thick borders. We will also add an autoplay option and the mousewheel functionality.</p>
<p>We&#8217;ll use the <a target="_blank" href="https://github.com/heygrady/transform/wiki">jQuery 2D Transformation Plugin</a> for rotating the images and the <a target="_blank" href="https://github.com/brandonaaron/jquery-mousewheel">jQuery Mousewheel Plugin</a> by Brandon Aaron for the mousewheel control.</p>
<p>The beautiful photos are by Andrew and Lili and you can see their Behance profile here:<br />
<a target="_blank" href="http://www.behance.net/AndrewLili">http://www.behance.net/AndrewLili</a><br />
The images are licensed under the <a target="_blank" href="http://creativecommons.org/licenses/by-nc/3.0/">Creative Commons Attribution-NonCommercial 3.0 Unported License</a>.</p>
<p>Allrighty! Let&#8217;s start with the HTML!</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>First, we will wrap all our slider elements in a wrapper with the class &#8220;rm_wrapper&#8221;:</p>
<pre class="brush:xml">
&lt;div class="rm_wrapper"&gt;
...
&lt;/div&gt;
</pre>
<p>Inside of that wrapper we will have a container for the actual slider list, some mask and corner elements, the heading and a hidden div that will contain all the image sets:</p>
<pre class="brush:xml">
&lt;div id="rm_container" class="rm_container"&gt;
	&lt;ul&gt;
		&lt;li data-images="rm_container_1" data-rotation="-15"&gt;
			&lt;img src="images/1.jpg"/&gt;
		&lt;/li&gt;
		&lt;li data-images="rm_container_2" data-rotation="-5"&gt;
			&lt;img src="images/2.jpg"/&gt;
		&lt;/li&gt;
		&lt;li data-images="rm_container_3" data-rotation="5"&gt;
			&lt;img src="images/3.jpg"/&gt;
		&lt;/li&gt;
		&lt;li data-images="rm_container_4" data-rotation="15"&gt;
			&lt;img src="images/4.jpg"/&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;div id="rm_mask_left" class="rm_mask_left"&gt;&lt;/div&gt;
	&lt;div id="rm_mask_right" class="rm_mask_right"&gt;&lt;/div&gt;
	&lt;div id="rm_corner_left" class="rm_corner_left"&gt;&lt;/div&gt;
	&lt;div id="rm_corner_right" class="rm_corner_right"&gt;&lt;/div&gt;
	&lt;h2&gt;Fashion Explosion 2012&lt;/h2&gt;
	&lt;div style="display:none;"&gt;
		&lt;div id="rm_container_1"&gt;
			&lt;img src="images/1.jpg"/&gt;
			&lt;img src="images/5.jpg"/&gt;
			&lt;img src="images/6.jpg"/&gt;
			&lt;img src="images/7.jpg"/&gt;
		&lt;/div&gt;
		&lt;div id="rm_container_2"&gt;
			&lt;img src="images/2.jpg"/&gt;
			&lt;img src="images/8.jpg"/&gt;
			&lt;img src="images/9.jpg"/&gt;
			&lt;img src="images/10.jpg"/&gt;
		&lt;/div&gt;
		&lt;div id="rm_container_3"&gt;
			&lt;img src="images/3.jpg"/&gt;
			&lt;img src="images/11.jpg"/&gt;
			&lt;img src="images/12.jpg"/&gt;
			&lt;img src="images/13.jpg"/&gt;
		&lt;/div&gt;
		&lt;div id="rm_container_4"&gt;
			&lt;img src="images/4.jpg"/&gt;
			&lt;img src="images/14.jpg"/&gt;
			&lt;img src="images/15.jpg"/&gt;
			&lt;img src="images/16.jpg"/&gt;
		&lt;/div&gt;
	&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>So the unordered lists will have the first set of four images where each list element has some data attributes for the image sets and the rotation degree. We will use that data to know which images come next and how much each image should be rotated.</p>
<p>The mask and corner divs will be absolute elements that we will place on top of the slider, slightly rotated in order to cover some areas. Since we will use the same background color for these elements like the body&#8217;s background color, we will create the illusion of the images being shaped in a certain way.</p>
<p>Then we&#8217;ll add the elements for the navigation and the autoplay controls:</p>
<pre class="brush:xml">
&lt;div class="rm_nav"&gt;
	&lt;a id="rm_next" href="#" class="rm_next"&gt;&lt;/a&gt;
	&lt;a id="rm_prev" href="#" class="rm_prev"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;div class="rm_controls"&gt;
	&lt;a id="rm_play" href="#" class="rm_play"&gt;Play&lt;/a&gt;
	&lt;a id="rm_pause" href="#" class="rm_pause"&gt;Pause&lt;/a&gt;
&lt;/div&gt;
</pre>
<p>Let&#8217;s take a look at the CSS.</p>
<h3>The CSS</h3>
<p>First, we&#8217;ll reset some styles and define the properties for the body. (Remember, if we would have another background color, we would want to change the background and border colors of some of the elements in our slider, too.)</p>
<pre class="brush:css">
@import url('reset.css');
body{
	background:#f0f0f0;
	color:#000;
	font-family: 'PT Sans Narrow', Arial, sans-serif;
	font-size:16px;
}
a{
	color:#000;
	text-decoration:none;
}
h1{
	padding:10px;
	margin:20px;
	font-size:40px;
	text-transform:uppercase;
	text-shadow:0px 0px 1px #fff;
	color:#333;
	background:transparent url(../images/line.png) repeat-x bottom left;
}
</pre>
<p>The main wrapper will have the following style:</p>
<pre class="brush:css">
.rm_wrapper{
	width:1160px;
	margin:0 auto;
	position:relative;
}
</pre>
<p>The container for the slider will have any overflow hidden, which will help shaping our slider since we will cut off the outer sides of it:</p>
<pre class="brush:css">
.rm_container{
	width:1050px;
	overflow:hidden;
	position:relative;
	height:530px;
	margin:0 auto;
}
</pre>
<p>The heading will have the following style:</p>
<pre class="brush:css">
.rm_container h2{
	background:transparent url(../images/lines.png) repeat top left;
	padding:10px 30px;
	position:absolute;
	bottom:170px;
	right:0px;
	color:#000;
	font-size:36px;
	text-transform:uppercase;
	text-shadow:1px 0px 1px #fff;
}
</pre>
<p>Let&#8217;s define the width for the ul to be bigger than the container since we want to make the list element float next to each other:</p>
<pre class="brush:css">
.rm_container ul{
	width:1170px;
}
</pre>
<p>By giving a negative left margin and a thick border to the list element, we will overlap the images and cut off the right sides so that we create our asymmetrical shapes by rotating the elements then. The border color will be the same like the background color of the body (or the container). </p>
<pre class="brush:css">
.rm_container ul li{
	float:left;
	margin-left:-80px;
	position:relative;
	overflow:hidden;
	width:310px;
	height:465px;
	border:30px solid #f0f0f0;
	border-width:50px 30px 0px 30px;
	background-color:#f0f0f0;
}
</pre>
<p>We&#8217;ll position the images absolutely:</p>
<pre class="brush:css">
.rm_container ul li img{
	position:absolute;
	top:0px;
	left:0px;
}
</pre>
<p>In the following we will style the mask and the corner elements. They will be all positioned absolutely and we&#8217;ll give them the grey background color. By rotating them, we&#8217;ll make the images to appear as being &#8220;shaped&#8221;:</p>
<pre class="brush:css">
.rm_mask_right, .rm_mask_left{
	position: absolute;
	height: 110px;
	background: #f0f0f0;
	width: 530px;
	bottom: -30px;
	left: 0px;
	-moz-transform:rotate(-3deg);
	-webkit-transform:rotate(-3deg);
	transform:rotate(-3deg);
}
.rm_mask_right{
	left:auto;
	right:0px;
	-moz-transform:rotate(3deg);
	-webkit-transform:rotate(3deg);
	transform:rotate(3deg);
}
.rm_corner_right, .rm_corner_left{
	background: #f0f0f0;
	position:absolute;
	width:200px;
	height:100px;
	bottom:0px;
	left:-65px;
	-moz-transform:rotate(45deg);
	-webkit-transform:rotate(45deg);
	transform:rotate(45deg);
}
.rm_corner_right{
	left:auto;
	right:-65px;
	-moz-transform:rotate(-45deg);
	-webkit-transform:rotate(-45deg);
	transform:rotate(-45deg);
}
</pre>
<p>The navigation elements will be placed to the left and right of the main container:</p>
<pre class="brush:css">
.rm_nav a{
	position:absolute;
	top:200px;
	width:38px;
	height:87px;
	cursor:pointer;
	opacity:0.7;
}
.rm_nav a:hover{
	opacity:1.0;
}
.rm_nav a.rm_next{
	background:transparent url(../images/next.png) no-repeat top left;
	right:0px;
}
.rm_nav a.rm_prev{
	background:transparent url(../images/prev.png) no-repeat top left;
	left:0px;
}
</pre>
<p>The pause/play control will be placed to the top left of the main container:</p>
<pre class="brush:css">
.rm_controls{
	position:absolute;
	top:0px;
	left:-40px;
	height:20px;
}
.rm_controls a{
	cursor:pointer;
	opacity:0.7;
	padding-left:24px;
	font-size:16px;
	text-transform:uppercase;
	height:20px;
	float:left;
	line-height:20px;
}
.rm_controls a:hover{
	opacity:1.0;
}
.rm_controls a.rm_play{
	display:none;
	background:transparent url(../images/play.png) no-repeat center left;
}
.rm_controls a.rm_pause{
	background:transparent url(../images/pause.png) no-repeat center left;
}
</pre>
<p>And that&#8217;s all the style! Let add the spice!</p>
<h3>The JavaScript</h3>
<p>The main idea for the slider functionality is to add another image before the current one with a slightly increased rotation degree than the current item. Then we will animate the rotation and make the new images appear.<br />
So let&#8217;s start by caching some elements and checking if we are dealing with a special needs browser in order to deal with some issues:</p>
<pre class="brush:js">
//our 4 items
var $listItems 		= $('#rm_container &gt; ul &gt; li'),
	totalItems		= $listItems.length,

	//the controls
	$rm_next		= $('#rm_next'),
	$rm_prev		= $('#rm_prev'),
	$rm_play		= $('#rm_play'),
	$rm_pause		= $('#rm_pause'),

	//the masks and corners of the slider
	$rm_mask_left	= $('#rm_mask_left'),
	$rm_mask_right	= $('#rm_mask_right'),
	$rm_corner_left	= $('#rm_corner_left'),
	$rm_corner_right= $('#rm_corner_right'),

	//check if the browser is &lt;= IE8
	ieLte8			= ($.browser.msie &#038;&#038; parseInt($.browser.version) &lt;= 8),
</pre>
<p>Then we will define our main function:</p>
<pre class="brush:js">
RotateImageMenu	= (function() {
...
})();

RotateImageMenu.init();
</pre>
<p>And then we define the following in our function:</p>
<pre class="brush:js">
	//difference of animation time between the items
var	timeDiff			= 300,
	//time between each image animation (slideshow)
	slideshowTime		= 3000,
	slideshowInterval,
	//checks if the images are rotating
	isRotating			= false,
	//how many images completed each slideshow iteration
	completed			= 0,
	/*
	all our images have 310 of width and 465 of height.
	this could / should be dynamically calculated
	if we would have different image sizes.

	we will set the rotation origin at
	x = width/2 and y = height*2
	*/
	origin				= ['155px', '930px'],
	init				= function() {
		configure();
		initEventsHandler();
	},
	//initialize some events
	initEventsHandler	= function() {
		/*
		next and previous arrows:
		we will stop the slideshow if active,
		and rotate each items images.
		1 	rotate right
		-1 	rotate left
		*/
		$rm_next.bind('click', function(e) {
			stopSlideshow();
			rotateImages(1);
			return false;
		});
		$rm_prev.bind('click', function(e) {
			stopSlideshow();
			rotateImages(-1);
			return false;
		});
		/*
		start and stop the slideshow
		*/
		$rm_play.bind('click', function(e) {
			startSlideshow();
			return false;
		});
		$rm_pause.bind('click', function(e) {
			stopSlideshow();
			return false;
		});
		/*
		adds events to the mouse and left / right keys
		*/
		$(document).bind('mousewheel', function(e, delta) {
			if(delta &gt; 0) {
				stopSlideshow();
				rotateImages(0);
			}
			else {
				stopSlideshow();
				rotateImages(1);
			}
			return false;
		}).keydown(function(e){
			switch(e.which){
				case 37:
					stopSlideshow();
					rotateImages(0);
					break;
				case 39:
					stopSlideshow();
					rotateImages(1);
					break;
			}
		});
	},
	/*
	rotates each items images.
	we set a delay between each item animation
	*/
	rotateImages		= function(dir) {
		//if the animation is in progress return
		if(isRotating) return false;

		isRotating = true;

		$listItems.each(function(i) {
			var $item 				= $(this),
				/*
				the delay calculation.
				if rotation is to the right,
				then the first item to rotate is the first one,
				otherwise the last one
				*/
				interval			= (dir === 1) ? i * timeDiff : (totalItems - 1 - i) * timeDiff;

			setTimeout(function() {
					//the images associated to this item
				var	$otherImages		= $('#' + $item.data('images')).children('img'),
					totalOtherImages	= $otherImages.length;

					//the current one
					$img				= $item.children('img:last'),
					//keep track of each items current image
					current				= $item.data('current');
					//out of bounds
					if(current &gt; totalOtherImages - 1)
						current = 0;
					else if(current &lt; 0)
						current = totalOtherImages - 1;

					//the next image to show and its
					//initial rotation (depends on dir)
					var otherRotation	= (dir === 1) ? '-30deg' : '30deg',
						$other			= $otherImages.eq(current).clone();

					//for IE &lt;= 8 we will not rotate,
					//but fade out / fade in ...
					//better than nothing :)
					if(!ieLte8)
						$other.css({
							rotate	: otherRotation,
							origin	: origin
						});

					(dir === 1) ? ++current : --current;

					//prepend the next image to the &lt;li&gt;
					$item.data('current', current).prepend($other);

					//the final rotation for the current image
					var rotateTo		= (dir === 1) ? '80deg' : '-80deg';

					if(!ieLte8) {
						$img.animate({
							rotate	: rotateTo
						}, 1200, function(){
							$(this).remove();
							++completed;
							if(completed === 4) {
								completed = 0;
								isRotating = false;
							}
						});
						$other.animate({
							rotate	: '0deg'
						}, 600);
					}
					else {
						$img.fadeOut(1200, function(){
							$(this).remove();
							++completed;
							if(completed === 4) {
								completed = 0;
								isRotating = false;
							}
						});
					}

			}, interval );
		});

	},
	//set initial rotations
	configure			= function() {
		if($.browser.msie &#038;&#038; !ieLte8)
			rotateMaskCorners();
		else if(ieLte8)
			hideMaskCorners();

		$listItems.each(function(i) {
			//the initial current is 1
			//since we already showing the first image
			var $item = $(this).data('current', 1);

			if(!ieLte8)
			$item.transform({rotate: $item.data('rotation') + 'deg'})
				 .find('img')
				 .transform({origin: origin});
		});
	},
	//rotates the masks and corners
	rotateMaskCorners	= function() {
		$rm_mask_left.transform({rotate: '-3deg'});
		$rm_mask_right.transform({rotate: '3deg'});
		$rm_corner_left.transform({rotate: '45deg'});
		$rm_corner_right.transform({rotate: '-45deg'});
	},
	//hides the masks and corners
	hideMaskCorners		= function() {
		$rm_mask_left.hide();
		$rm_mask_right.hide();
		$rm_corner_left.hide();
		$rm_corner_right.hide();
	},
	startSlideshow		= function() {
		clearInterval(slideshowInterval);
		rotateImages(1);
		slideshowInterval	= setInterval(function() {
			rotateImages(1);
		}, slideshowTime);
		//show the pause button and hide the play button
		$rm_play.hide();
		$rm_pause.show();
	},
	stopSlideshow		= function() {
		clearInterval(slideshowInterval);
		//show the play button and hide the pause button
		$rm_pause.hide();
		$rm_play.show();
	};

return {init : init};
</pre>
<p>As you noticed, we will treat older browsers a bit differently so that the slider works properly. </p>
<p>And that&#8217;s it! We really hope you enjoyed the tutorial and like the result!</p>
<p><a class="demo" href="http://tympanus.net/Tutorials/RotatingImageSlider/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/RotatingImageSlider/RotatingImageSlider.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/04/28/rotating-image-slider/feed/</wfw:commentRss>
		<slash:comments>126</slash:comments>
		</item>
		<item>
		<title>3D Wall Gallery</title>
		<link>http://tympanus.net/codrops/2011/02/02/3d-wall-gallery/</link>
		<comments>http://tympanus.net/codrops/2011/02/02/3d-wall-gallery/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 12:41:37 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[perspective]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[thumbnails]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=4047</guid>
		<description><![CDATA[View demoDownload source Today we want to share our latest experiment with you: the 3D Wall Gallery. Using the Safari browser the images of this gallery will be put into 3D perspective, when scrolling or sliding. When viewed with another browser, the gallery will be shown normally, retaining all the functionality. For seeing the 3D [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Development/3DWallGallery/" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/02/3dwallgallery.jpg" alt="" title="3dwallgallery" width="580" height="315" class="aligncenter size-full wp-image-4060" /></a></p>
<p><a class="demo" href="http://tympanus.net/Development/3DWallGallery/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Development/3DWallGallery/3DWallGallery.zip">Download source</a></p>
<p>Today we want to share our latest experiment with you: the 3D Wall Gallery. Using the Safari browser the images of this gallery will be put into 3D perspective, when scrolling or sliding. When viewed with another browser, the gallery will be shown normally, retaining all the functionality.</p>
<p><strong>For seeing the 3D effect, please try the demo in Safari.</strong></p>
<p>Summarized, you can do the following things in this gallery:</p>
<ul>
<li>Hover an image to see a description</li>
<li>Slide through the images using the jQuery UI Slider at the top</li>
<li>Use the mouse wheel to scroll through the images</li>
<li>Use the thumbnail previewer at the bottom to choose an image</li>
<li>Use the hash anchor for the image in the URL to get to it directly</li>
<li>Click on an image to slide it to the left (notice the hash anchor in the URL)</li>
<li><strong>Turn it into a 3D wall when scrolling/sliding (Safari users)</strong></li>
<li><strong>Flipping the perspective when changing the slide/scroll direction (Safari users)</strong></li>
</ul>
<p>We are using the jQuery hash change plugin by Ben Alman:<br />
<a href="http://benalman.com/projects/jquery-hashchange-plugin/" target="_blank">jQuery Hashchange Plugin</a></p>
<p>And we are also using the jQuery Mousewheel Plugin by Brandon Aaron:<br />
<a href="http://brandonaaron.net/code/mousewheel/docs" target="_blank">jQuery Mousewheel Plugin</a></p>
<p>The beautiful photography is by Alan Antiporda from Illusive Photography and you can find his Flickr Photostream here: <a target="_blank" href="http://www.flickr.com/photos/alanant">Illusive Photography Photostream</a></p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<p><img src="http://tympanus.net/codrops/wp-content/uploads/2011/02/3dwall_image0.jpg" alt="" title="3dwall_image0" width="580" height="304" class="nofancy aligncenter size-full wp-image-4048" /><br />
When viewed in the Safari browser, you will see the perspective happening while scrolling or sliding. When changing the direction of scrolling, you will notice that the perspective will tilt to the other side.</p>
<p><img src="http://tympanus.net/codrops/wp-content/uploads/2011/02/3dwall_image1.jpg" alt="" title="3dwall_image1" width="580" height="304" class="nofancy aligncenter size-full wp-image-4049" /><br />
You can navigate through the images by either using the jQuery UI slider at the top or your mousewheel. </p>
<p><img src="http://tympanus.net/codrops/wp-content/uploads/2011/02/3dwall_image2.jpg" alt="" title="3dwall_image2" width="580" height="304" class="nofancy aligncenter size-full wp-image-4050" /><br />
You can also use the thumbnails previewer to click on an image and get to it directly.</p>
<p><img src="http://tympanus.net/codrops/wp-content/uploads/2011/02/3dwall_image3.jpg" alt="" title="3dwall_image3" width="580" height="304" class="nofancy aligncenter size-full wp-image-4051" /><br />
When hovering over an image you can see a little description at the top.</p>
<p>We hope that you enjoy our little experiment and find it useful!</p>
<p><a class="demo" href="http://tympanus.net/Development/3DWallGallery/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Development/3DWallGallery/3DWallGallery.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/02/02/3d-wall-gallery/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
		<item>
		<title>Thumbnails Preview Slider with jQuery</title>
		<link>http://tympanus.net/codrops/2011/01/27/thumbnails-preview-slider/</link>
		<comments>http://tympanus.net/codrops/2011/01/27/thumbnails-preview-slider/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 14:27:37 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[preview]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[thumbnails]]></category>
		<category><![CDATA[tooltip]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=3849</guid>
		<description><![CDATA[View demoDownload source In this tutorial we will show you how to create and use a thumbnails preview slider with jQuery. Since we got a lot of requests to show how to make the preview slider work separately from the full image view, we decided to make a tutorial on how to use the little [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://tympanus.net/Tutorials/ThumbnailsPreviewSlider/" target="_blank"><img class="aligncenter size-full wp-image-3870" title="thumbnailsPreviewSlider" src="http://tympanus.net/codrops/wp-content/uploads/2011/01/thumbnailsPreviewSlider2.jpg" alt="" width="580" height="315" /></a></p>
<p><a class="demo" href="http://tympanus.net/Tutorials/ThumbnailsPreviewSlider/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/ThumbnailsPreviewSlider/ThumbnailsPreviewSlider.zip">Download source</a></p>
<p>In this tutorial we will show you how to create and use a thumbnails preview slider with jQuery. Since we got a lot of requests to show how to make the preview slider work separately from the full image view, we decided to make a tutorial on how to use the little thumbnails preview part only.</p>
<p>Check out the <a href="http://tympanus.net/codrops/2011/01/19/sweet-thumbnails-gallery/">Sweet Thumbnails Preview Gallery</a> where me make use of the thumbnails slider idea.</p>
<p>The images are by talented tibchris and you can find them on his Flickr photostream:<br />
<a href="http://www.flickr.com/photos/arcticpuppy/" target="_blank">tibchris&#8217; photostream</a></p>
<p>So, let&#8217;s start with the markup.</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>The HTML structure will be built up of a main container list that will hold the dot items and a special list item for the thumbnails. The special list item will have the class &#8220;ts_thumbnails&#8221; and it will be the element that holds the little window where we will see the thumbnails once we hover over a dot.</p>
<pre class="brush:xml">&lt;ul class="ts_container"&gt;
	&lt;li&gt;&lt;a href="#"&gt;Image 1&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Image 2&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Image 3&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Image 4&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Image 5&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Image 6&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Image 7&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Image 8&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Image 9&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Image 10&lt;/a&gt;&lt;/li&gt;
	&lt;li class="ts_thumbnails"&gt;
		&lt;div class="ts_preview_wrapper"&gt;
			&lt;!-- List with thumbnails/preview items --&gt;
		&lt;/div&gt;
		&lt;span&gt;&lt;/span&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>The empty span will be the little triangle that points to the current dot.<br />
The thumbnails list which will be inside of the div with the class &#8220;ts_preview_wrapper&#8221; will have the following structure:</p>
<pre class="brush:xml">&lt;ul class="ts_preview"&gt;
	&lt;li&gt;&lt;img src="images/thumbs1/1.jpg" alt="Thumb 1" /&gt;&lt;/li&gt;
	&lt;li&gt;&lt;img src="images/thumbs1/2.jpg" alt="Thumb 2" /&gt;&lt;/li&gt;
	&lt;li&gt;&lt;img src="images/thumbs1/3.jpg" alt="Thumb 3" /&gt;&lt;/li&gt;
	&lt;li&gt;&lt;img src="images/thumbs1/4.jpg" alt="Thumb 4" /&gt;&lt;/li&gt;
	&lt;li&gt;&lt;img src="images/thumbs1/5.jpg" alt="Thumb 5" /&gt;&lt;/li&gt;
	&lt;li&gt;&lt;img src="images/thumbs1/6.jpg" alt="Thumb 6" /&gt;&lt;/li&gt;
	&lt;li&gt;&lt;img src="images/thumbs1/7.jpg" alt="Thumb 7" /&gt;&lt;/li&gt;
	&lt;li&gt;&lt;img src="images/thumbs1/8.jpg" alt="Thumb 8" /&gt;&lt;/li&gt;
	&lt;li&gt;&lt;img src="images/thumbs1/9.jpg" alt="Thumb 9" /&gt;&lt;/li&gt;
	&lt;li&gt;&lt;img src="images/thumbs1/10.jpg" alt="Thumb 10" /&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>Now, let&#8217;s take a look at the style.</p>
<h3>The CSS</h3>
<p>The main container list will be of relative positioning and its width will be the sum of the all the dots&#8217; widths:</p>
<pre class="brush:css">ul.ts_container{
	list-style:none;
	margin:0;
	padding:0;
	width:170px;
	margin:20px auto;
	position:relative;
	height:17px;
}
</pre>
<p>Like we will see later, the width of a dot is 11 plus a padding on each side of 3 pixels. This is just a general style for the main that we will we using in all three showcases. If you have more than 10 dots, you will need to adapt this value to fit all the items (same for the height).</p>
<p>The list items, i.e. the dots, will float left:</p>
<pre class="brush:css">ul.ts_container li{
	float:left;
}
</pre>
<p>The dots itself will be a background image and we will indent the text so that we don&#8217;t see it:</p>
<pre class="brush:css">ul.ts_container li a{
	display:block;
	text-indent:-9000px;
	width:11px;
	height:11px;
	outline:none;
	padding:0px 3px;
	background:transparent url(../images/sliderIcons/dot.png) no-repeat top center;
}
</pre>
<p>On hover, we will change the position of the background image so that we see the lower part of it:</p>
<pre class="brush:css">ul.ts_container li a:hover,
ul.ts_container li.selected a{
	background-position:50% -11px;
}
</pre>
<p>The last list item which is our special thumbnails container will be of absolute positioning since we want to move it around. It&#8217;s initially not visible:</p>
<pre class="brush:css">ul.ts_container li.ts_thumbnails{
	display:none;
	position:absolute;
}
</pre>
<p>The empty span will be our little triangle. We will set it&#8217;s position dynamically since it depends on the size of your thumbnails:</p>
<pre class="brush:css">ul.ts_container li.ts_thumbnails span{
	background:transparent url(../images/sliderIcons/triangle.png) no-repeat top center;
	width:15px;
	height:6px;
	position:absolute;
}
</pre>
<p><strong>Tip:</strong> If you feel generally uncomfortable with using empty elements in your HTML, simply add a meaningful text to it and set the text-indent to a very low value so that it&#8217;s not visible. Your HTML will be more readable and you can sleep better :)</p>
<p>The preview wrapper will have a white border and a nice box shadow. The dimensions are, again, set dynamically since they depend on the size of your thumbnails. The overflow should be hidden, because we will have a row of thumbnails in the list inside of this wrapper:</p>
<pre class="brush:css">.ts_preview_wrapper{
	border:5px solid #fff;
	overflow:hidden;
	position:relative;
	-moz-box-shadow:0px 0px 5px #999;
	-webkit-box-shadow:0px 0px 5px #999;
	box-shadow:0px 0px 5px #999;
}
</pre>
<p>The list with all the thumbnails will be absolute, since we want to animate its left position in order to show the right thumbnail. The dimensions are calculated dynamically, for example, the width will be the sum of all thumbnails widths. But we will look into that when we define our JavaScript function.</p>
<pre class="brush:css">ul.ts_preview{
	position:absolute;
	left:0px;
	top:0px;
	margin:0;
	padding:0;
	list-style-type:none;
}
</pre>
<p>The list items that hold the thumbnails will be floating left, so that they are stacked horizontally:</p>
<pre class="brush:css">ul.ts_preview li{
	float:left;
}
</pre>
<p>The thumbnails need to be display block, to avoid any spacing in the li:</p>
<pre class="brush:css">ul.ts_preview li img{
	display:block;
}
</pre>
<p>And that&#8217;s all the style! Let make some magic and go through one example.</p>
<h3>The JavaScript</h3>
<p>The main idea of this little thumbnail slider is to be able to use it with any (reasonable) size of thumbnails and to add certain effects to it. So, we will make a plugin which will look as follows:</p>
<pre class="brush:js">(function($) {
	$.fn.thumbnailSlider = function(options) {
		var opts = $.extend({}, $.fn.thumbnailSlider.defaults, options);
		return this.each(function() {
			...
		});
	};
	$.fn.thumbnailSlider.defaults = {
		speed		: 100, //speed of each slide animation
		easing		: 'jswing', //easing effect for the slide animation
		thumb_width	: 75, //your photos width
		thumb_height: 75, //your photos height
		zoom		: false, //zoom animation for the thumbs
		zoomratio	: 1.3, //multiplicator for zoom (must be &gt; 1)
		zoomspeed	: 15000, //speed of zoom animation
		onClick		: function(){return false;} //click callback
	};
})(jQuery);
</pre>
<p>Now let&#8217;s take a deeper look at the plugin functionality. First, we need to define some variables:</p>
<pre class="brush:js">var $this 				= $(this),
	o 					= $.meta ? $.extend({}, opts, $pxs_container.data()) : opts;

var $ts_container		= $this.children('.ts_container'),
	$ts_thumbnails		= $ts_container.children('.ts_thumbnails'),
	$nav_elems			= $ts_container.children('li').not($ts_thumbnails),
	total_elems			= $nav_elems.length,
	$ts_preview_wrapper	= $ts_thumbnails.children('.ts_preview_wrapper'),
	$arrow				= $ts_thumbnails.children('span'),
	$ts_preview			= $ts_preview_wrapper.children('.ts_preview');
</pre>
<p>We also need to calculate some values that we need to set to certain elements. The &#8220;ts_thumbnails&#8221; container which is our little white frame that holds the list of thumbnails, will have a width composed of the thumbnail width and its border (which is 5 pixels on each side). The height will also contain the height of the little triangle span which is 6 pixels. The top will always be the same, a negative value since we need to &#8220;pull it up&#8221; to be above the dot list. The left value is calculated by getting the left position of the current dot and subtracting half of the thumbnails width. This will position it at the beginning of the respective dot, so we need to add half of the dot&#8217;s width in order really center it correctly above the dot:</p>
<pre class="brush:js">/*
calculate sizes for $ts_thumbnails:
width 	-&gt; width thumbnail + border (2*5)
height 	-&gt; height thumbnail + border + triangle height(6)
top		-&gt; -(height plus margin of 5)
left	-&gt; leftDot - 0.5*width + 0.5*widthNavDot
	this will be set when hovering a dot,
	and the default value will correspond to the first nav dot
*/
var w_ts_thumbnails	= o.thumb_width + 2*5,
	h_ts_thumbnails	= o.thumb_height + 2*5 + 6,
	t_ts_thumbnails	= -(h_ts_thumbnails + 5),
	$first_nav		= $nav_elems.eq(0),
	l_ts_thumbnails	= $first_nav.position().left - 0.5*w_ts_thumbnails + 0.5*$first_nav.width();
</pre>
<p>Now we need to set all those values:</p>
<pre class="brush:js">$ts_thumbnails.css({
	width	: w_ts_thumbnails + 'px',
	height	: h_ts_thumbnails + 'px',
	top		: t_ts_thumbnails + 'px',
	left	: l_ts_thumbnails + 'px'
});
</pre>
<p>Next step is to position the triangle correctly. For calculating the top of the triangle we need the height of the thumb plus its border. The left value will depend on the width of the thumbnail: we take the width plus the border and take half of that, and then we subtract half of the width of the triangle. This will center the little triangle:</p>
<pre class="brush:js">/*
calculate the top and left for the triangle/tooltip
top		-&gt; thumb height + border(2*5)
left	-&gt; (thumb width + border)/2 -width/2
*/
var t_arrow	= o.thumb_height + 2*5,
	l_arrow	= (o.thumb_width + 2*5) / 2 - $arrow.width() / 2;
$arrow.css({
	left	: l_arrow + 'px',
	top		: t_arrow + 'px',
});
</pre>
<p>The list &#8220;ts_preview&#8221; that holds all the thumbnails, needs a width and we can calculate it by multiplying the width of a thumbnail with the number of total thumbnails:</p>
<pre class="brush:js">/*
calculate the $ts_preview width -&gt; thumb width times number of thumbs
*/
$ts_preview.css('width' , total_elems*o.thumb_width + 'px');
</pre>
<p>Then we set its width and also its height, which will simply be the height of a thumbnail:</p>
<pre class="brush:js">$ts_preview_wrapper.css({
	width	: o.thumb_width + 'px',
	height	: o.thumb_height + 'px'
});
</pre>
<p>Now we will define what happens when we hover a navigation element i.e. a dot. We&#8217;ll get the index of the dot to know to which thumbnail item we need to slide to. Then we calculate the left value to which we want to slide the frame to, i.e. the &#8220;ts_thumbnails&#8221; list item. We also animate the list of thumbnails to the right position which we know because of the current index of the dot.</p>
<p>If the zoom option was chosen, we will increase the width and height of the thumbnail:</p>
<pre class="brush:js">$nav_elems.bind('mouseenter',function(){
	var $nav_elem	= $(this),
		idx			= $nav_elem.index();

	/*
	calculate the new left
	for $ts_thumbnails
	*/
	var new_left	= $nav_elem.position().left - 0.5*w_ts_thumbnails + 0.5*$nav_elem.width();

	$ts_thumbnails.stop(true)
				  .show()
				  .animate({
					left	: new_left + 'px'
				  },o.speed,o.easing);				  

	/*
	animate the left of the $ts_preview to show the right thumb
	*/
	$ts_preview.stop(true)
			   .animate({
					left	: -idx*o.thumb_width + 'px'
			   },o.speed,o.easing);

	//zoom in the thumb image if zoom is true
	if(o.zoom &amp;&amp; o.zoomratio &gt; 1){
		var new_width	= o.zoomratio * o.thumb_width,
			new_height	= o.zoomratio * o.thumb_height;

		//increase the $ts_preview width in order to fit the zoomed image
		var ts_preview_w	= $ts_preview.width();
		$ts_preview.css('width' , (ts_preview_w - o.thumb_width + new_width)  + 'px');

		$ts_preview.children().eq(idx).find('img').stop().animate({
			width		: new_width + 'px',
			height		: new_height + 'px'
		},o.zoomspeed);
	}		

}).bind('mouseleave',function(){
	//if zoom set the width and height to defaults
	if(o.zoom &amp;&amp; o.zoomratio &gt; 1){
		var $nav_elem	= $(this),
			idx			= $nav_elem.index();
		$ts_preview.children().eq(idx).find('img').stop().css({
			width	: o.thumb_width + 'px',
			height	: o.thumb_height + 'px'
		});
	}

	$ts_thumbnails.stop(true)
				  .hide();

}).bind('click',function(){
	var $nav_elem	= $(this),
		idx			= $nav_elem.index();

	o.onClick(idx);
});
</pre>
<p>And that&#8217;s it! Now, let&#8217;s take a look at some examples!</p>
<h3>Example</h3>
<p><img class="nofancy alignleft size-full wp-image-3864" title="example_demo3_thumbnailSlider" src="http://tympanus.net/codrops/wp-content/uploads/2011/01/example_demo3_thumbnailSlider.jpg" alt="" width="102" height="146" /><br />
In the demo you will see four different examples, we will show you how to apply the last one. For that, we need to set the width and the height of the thumbnails and define some other parameters. We want the image to zoom in when we hover over the dot, so the following parameters are set:</p>
<pre class="brush:js">$('#demo4').thumbnailSlider({
	thumb_width	: 174,
	thumb_height: 260,
	speed		: 200,
	zoom		: true,
	zoomspeed	: 10000,
	zoomratio	: 1.7
});
</pre>
<p>We hope you enjoyed the tutorial and find it useful!</p>
<p><a class="demo" href="http://tympanus.net/Tutorials/ThumbnailsPreviewSlider/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/ThumbnailsPreviewSlider/ThumbnailsPreviewSlider.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/01/27/thumbnails-preview-slider/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Parallax Slider with jQuery</title>
		<link>http://tympanus.net/codrops/2011/01/03/parallax-slider/</link>
		<comments>http://tympanus.net/codrops/2011/01/03/parallax-slider/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 23:10:25 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[parallax]]></category>
		<category><![CDATA[rotation]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=3222</guid>
		<description><![CDATA[View demoDownload source Happy New Year! We will kick start 2011 with a vibrant image slider tutorial. We will make use of the parallax principle to move different backgrounds when we slide to an image in order to create some nice perspective. This will give a great depth to the whole slider when it&#8217;s in [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://tympanus.net/Tutorials/ParallaxSlider/"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/01/parallax_slider.jpg" alt="" title="parallax_slider" width="580" height="315" class="aligncenter size-full wp-image-3226" /></a><br />
<a class="demo" href="http://tympanus.net/Tutorials/ParallaxSlider/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/ParallaxSlider/ParallaxSlider.zip">Download source</a></p>
<p>Happy New Year! We will kick start 2011 with a vibrant image slider tutorial. We will make use of the parallax principle to move different backgrounds when we slide to an image in order to create some nice perspective. This will give a great depth to the whole slider when it&#8217;s in motion. </p>
<p>The wonderful images are taken from Tetsumo&#8217;s Flickr Photo Stream: <a target="_blank" href="http://www.flickr.com/photos/tetsumo/">http://www.flickr.com/photos/tetsumo/</a></p>
<p>So, let&#8217;s start!</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>The HTML structure is going to consist of a main container with the class &#8220;pxs_container&#8221;. We will add a wrapper for the three different backgrounds which we will animate differently to create the parallax. The background images will have some transparency since we want to see them moving on top of each other.</p>
<p>We will also add a loading element and the two unordered lists for the full images and the thumbnails. Further, we will add the navigation elements.</p>
<pre class="brush:xml">
&lt;div id="pxs_container" class="pxs_container"&gt;
	&lt;div class="pxs_bg"&gt;
		&lt;div class="pxs_bg1"&gt;&lt;/div&gt;
		&lt;div class="pxs_bg2"&gt;&lt;/div&gt;
		&lt;div class="pxs_bg3"&gt;&lt;/div&gt;
	&lt;/div&gt;
	&lt;div class="pxs_loading"&gt;Loading images...&lt;/div&gt;
	&lt;div class="pxs_slider_wrapper"&gt;
		&lt;ul class="pxs_slider"&gt;
			&lt;li&gt;&lt;img src="images/1.jpg" alt="First Image" /&gt;&lt;/li&gt;
			&lt;li&gt;&lt;img src="images/2.jpg" alt="Second Image" /&gt;&lt;/li&gt;
			...
		&lt;/ul&gt;
		&lt;div class="pxs_navigation"&gt;
			&lt;span class="pxs_next"&gt;&lt;/span&gt;
			&lt;span class="pxs_prev"&gt;&lt;/span&gt;
		&lt;/div&gt;
		&lt;ul class="pxs_thumbnails"&gt;
			&lt;li&gt;&lt;img src="images/thumbs/1.jpg" alt="First Image" /&gt;&lt;/li&gt;
			&lt;li&gt;&lt;img src="images/thumbs/2.jpg" alt="Second Image" /&gt;&lt;/li&gt;
			...
		&lt;/ul&gt;
	&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>Now, let&#8217;s take a look at the style.</p>
<h3>The CSS</h3>
<p>We will start with the main container. Since we will use the whole page for the width of the slider, we will set it to 100%. It will be of position relative because we will set all the element inside to position absolute (and we want them to be positioned relative to the container and not the page): </p>
<pre class="brush:css">
.pxs_container{
	width:100%;
	height:420px;
	position:relative;
	border-top:7px solid #333;
	border-bottom:7px solid #333;
	overflow:hidden;
	-moz-box-shadow:0px 0px 7px #000;
	-webkit-box-shadow:0px 0px 7px #000;
	box-shadow:0px 0px 7px #000;
}
</pre>
<p>The wrapper for the divs that will contain the parallax backgrounds will have a repeated background image. This image is just a simple gradient:</p>
<pre class="brush:css">
.pxs_bg{
	background:transparent url(../images/bg.png) repeat top left;
}
</pre>
<p>The divs inside of the wrapper will share the following style properties:</p>
<pre class="brush:css">
.pxs_bg div{
	position:absolute;
	top:0px;
	left:0px;
	height:420px;
	background-repeat:repeat;
	background-position:top left;
	background-color:transparent;
}
</pre>
<p>The width will be set dynamically in the JavaScript. The single background divs will have all a different background image:</p>
<pre class="brush:css">
.pxs_bg .pxs_bg1{
	background-image:url(../images/bg1.png);
}
.pxs_bg .pxs_bg2{
	background-image:url(../images/bg2.png);
}
.pxs_bg .pxs_bg3{
	background-image:url(../images/bg3.png);
}
</pre>
<p>We will also set the left value of these divs dynamically. But we will come back to that later. Let&#8217;s take a look at the other elements&#8217; style.</p>
<p>The following wrapper will be invisible in the beginning:</p>
<pre class="brush:css">
.pxs_slider_wrapper{
	display:none;
}
</pre>
<p>It contains all the elements that we want to load in the beginning, so once loading is done, we will show the wrapper and all its content.</p>
<p>Let&#8217;s reset the style for both lists:</p>
<pre class="brush:css">
.pxs_container ul{
	margin:0px;
	padding:0px;
	list-style:none;
}
</pre>
<p>The main idea for the slider list is that we make a really long list with all the li elements having a width of the whole window. So, what you see on screen of the slider is actually one whole li. We will set the width of the ul dynamically to be the window width times the number of images in the list. Making the li elements float left and the correct width of the ul will ensure that the li elements are lined up next to each other:</p>
<pre class="brush:css">
ul.pxs_slider{
	position:absolute;
	left:0px;
	top:0px;
	height:420px;
}
ul.pxs_slider li{
	height:420px;
	float:left;
	position:relative;
}
</pre>
<p>The slider image inside of the li will be centered horizontally by applying auto margins to the left and right:</p>
<pre class="brush:css">
ul.pxs_slider li img{
	display:block;
	margin:35px auto 0px auto;
	-moz-box-shadow:0px 0px 7px #222;
	-webkit-box-shadow:0px 0px 7px #222;
	box-shadow:0px 0px 7px #222;
	border: 8px solid transparent;
	-moz-border-radius:4px;
	-webkit-border-radius:4px;
	border-radius:4px;
}
</pre>
<p>Adding a transparent border and a box shadow will create a glass like effect around the image.</p>
<p>The thumbnails list will be positioned absolutely, too. We add a left of 50% because we want to center it, by dynamically setting its width and a negative left margin in the JavaScript:</p>
<pre class="brush:css">
ul.pxs_thumbnails{
	height:35px;
	position:absolute;
	top:320px;
	left:50%;
}
ul.pxs_thumbnails li{
	position:absolute;
	display:block;
}
</pre>
<p>We&#8217;ll add a white border around the thumbnails and give them a slick box shadow:</p>
<pre class="brush:css">
ul.pxs_thumbnails li img{
	border: 5px solid #FFFFFF;
	-moz-box-shadow:1px 1px 7px #555;
	-webkit-box-shadow:1px 1px 7px #555;
	box-shadow:1px 1px 7px #555;
	cursor:pointer;
	display:block;
	opacity:0.7;
}
</pre>
<p>The current image&#8217;s thumbnails should be completely opaque:</p>
<pre class="brush:css">
ul.pxs_thumbnails li.selected img{
	opacity:1.0;
}
</pre>
<p>The common style of the two navigation spans is the following:</p>
<pre class="brush:css">
.pxs_navigation span{
	position:absolute;
	width:30px;
	height:60px;
	-moz-box-shadow:0px 0px 2px #000;
	-webkit-box-shadow:0px 0px 2px #000;
	box-shadow:0px 0px 2px #000;
	top:145px;
	opacity:0.6;
	-moz-border-radius:4px;
	-webkit-border-radius:4px;
	border-radius:4px;
	cursor:pointer;
}
.pxs_navigation span:hover{
	opacity:0.9;
}
</pre>
<p>Let&#8217;s add an arrow to each navigation span:</p>
<pre class="brush:css">
.pxs_navigation span.pxs_prev{
	background:#000 url(../images/prev.png) no-repeat center center;
}
.pxs_navigation span.pxs_next{
	background:#000 url(../images/next.png) no-repeat center center;
}
</pre>
<p>We will set the left (pxs_prev) and the right (pxs_next) value dynamically in order to stick to the left and right side of the image.</p>
<p>And finally, we will style the loading element which will be centered:</p>
<pre class="brush:css">
.pxs_loading{
	color:#fff;
	font-size:20px;
	padding:15px 15px 15px 50px;
	position:absolute;
	background:#333 url(../images/ajax-loader.gif) no-repeat 10px 50%;
	-moz-border-radius:15px;
	-webkit-border-radius:15px;
	border-radius:15px;
	opacity:0.7;
	width:180px;
	position:absolute;
	top:150px;
	left:50%;
	margin-left:-90px;
}
</pre>
<p>And that&#8217;s all the style! Now, let&#8217;s add some kick-ass jQuery!</p>
<h3>The JavaScript</h3>
<p>The main idea of this slider is to slide the images (obviously) and to animate the three backgrounds differently to create some perspective. So, when we, for example, slide to the next image, we will animate the left value of the slider ul to minus the window width (because that&#8217;s the width of one li). We will also animate the background div that is visually the top-most background, but the animation will only be half of the window width. The background behind that one will move one quarter of the window width and so on. So the background which is &#8220;more far&#8221; will move less, just what the parallax principle describes.</p>
<p>We want to create a plugin out of this script, so we will initially define some options. We will start by caching the most important elements. </p>
<pre class="brush:js">
(function($) {
	$.fn.parallaxSlider = function(options) {
		var opts = $.extend({}, $.fn.parallaxSlider.defaults, options);
		return this.each(function() {
			var $pxs_container 	= $(this),
			o 				= $.meta ? $.extend({}, opts, $pxs_container.data()) : opts;

			//the main slider
			var $pxs_slider		= $('.pxs_slider',$pxs_container),
			//the elements in the slider
			$elems			= $pxs_slider.children(),
			//total number of elements
			total_elems		= $elems.length,
			//the navigation buttons
			$pxs_next		= $('.pxs_next',$pxs_container),
			$pxs_prev		= $('.pxs_prev',$pxs_container),
			//the bg images
			$pxs_bg1		= $('.pxs_bg1',$pxs_container),
			$pxs_bg2		= $('.pxs_bg2',$pxs_container),
			$pxs_bg3		= $('.pxs_bg3',$pxs_container),
			//current image
			current			= 0,
			//the thumbs container
			$pxs_thumbnails = $('.pxs_thumbnails',$pxs_container),
			//the thumbs
			$thumbs			= $pxs_thumbnails.children(),
			//the interval for the autoplay mode
			slideshow,
			//the loading image
			$pxs_loading	= $('.pxs_loading',$pxs_container),
			$pxs_slider_wrapper = $('.pxs_slider_wrapper',$pxs_container);

			//first, preload all the images
			var loaded		= 0,
			$images		= $pxs_slider_wrapper.find('img');

			$images.each(function(){
				var $img	= $(this);
				$('&lt;img/&gt;').load(function(){
					++loaded;
					if(loaded	== total_elems*2){
						$pxs_loading.hide();
						$pxs_slider_wrapper.show();

						//width of an image
						//(assuming all images have the same sizes)
						var one_image_w		= $pxs_slider.find('img:first').width();

						/*
						set the width of the slider,
						of each one of its elements, and of the
						navigation buttons
						 */
						setWidths($pxs_slider,
						$elems,
						total_elems,
						$pxs_bg1,
						$pxs_bg2,
						$pxs_bg3,
						one_image_w,
						$pxs_next,
						$pxs_prev);

						/*
						set the widths of the thumbs
						and spread them evenly
						 */
						$pxs_thumbnails.css({
							'width'			: one_image_w + 'px',
							'margin-left' 	: -one_image_w/2 + 'px'
						});
						var spaces	= one_image_w/(total_elems+1);
						$thumbs.each(function(i){
							var $this 	= $(this);
							var left	= spaces*(i+1) - $this.width()/2;
							$this.css('left',left+'px');

							if(o.thumbRotation){
								var angle 	= Math.floor(Math.random()*41)-20;
								$this.css({
									'-moz-transform'	: 'rotate('+ angle +'deg)',
									'-webkit-transform'	: 'rotate('+ angle +'deg)',
									'transform'			: 'rotate('+ angle +'deg)'
								});
							}
							//hovering the thumbs animates them up and down
							$this.bind('mouseenter',function(){
								$(this).stop().animate({top:'-10px'},100);
							}).bind('mouseleave',function(){
								$(this).stop().animate({top:'0px'},100);
							});
						});

						//make the first thumb to be selected
						highlight($thumbs.eq(0));

						//slide, when clicking the navigation buttons
						$pxs_next.bind('click',function(){
							++current;
							if(current &gt;= total_elems)
								if(o.circular)
									current = 0;
							else{
								--current;
								return false;
							}
							highlight($thumbs.eq(current));
							slide(current,
							$pxs_slider,
							$pxs_bg3,
							$pxs_bg2,
							$pxs_bg1,
							o.speed,
							o.easing,
							o.easingBg);
						});
						$pxs_prev.bind('click',function(){
							--current;
							if(current &lt; 0)
								if(o.circular)
									current = total_elems - 1;
							else{
								++current;
								return false;
							}
							highlight($thumbs.eq(current));
							slide(current,
							$pxs_slider,
							$pxs_bg3,
							$pxs_bg2,
							$pxs_bg1,
							o.speed,
							o.easing,
							o.easingBg);
						});

						/*
						clicking a thumb will slide to the respective image
						 */
						$thumbs.bind('click',function(){
							var $thumb	= $(this);
							highlight($thumb);
							//if autoplay interrupt when user clicks
							if(o.auto)
								clearInterval(slideshow);
							current 	= $thumb.index();
							slide(current,
							$pxs_slider,
							$pxs_bg3,
							$pxs_bg2,
							$pxs_bg1,
							o.speed,
							o.easing,
							o.easingBg);
						});

						/*
						activate the autoplay mode if
						that option was specified
						 */
						if(o.auto != 0){
							o.circular	= true;
							slideshow	= setInterval(function(){
								$pxs_next.trigger('click');
							},o.auto);
						}

						/*
						when resizing the window,
						we need to recalculate the widths of the
						slider elements, based on the new window width;
						we need to slide again to the current one,
						since the left of the slider is no longer correct
						 */
						$(window).resize(function(){
							w_w	= $(window).width();
							setWidths(
								$pxs_slider,
								$elems,
								total_elems,
								$pxs_bg1,
								$pxs_bg2,
								$pxs_bg3,
								one_image_w,
								$pxs_next,
								$pxs_prev
								);
							slide(
								current,
								$pxs_slider,
								$pxs_bg3,
								$pxs_bg2,
								$pxs_bg1,
								1,
								o.easing,
								o.easingBg
								);
						});

					}
				}).error(function(){
					alert('here')
				}).attr('src',$img.attr('src'));
			});
		});
	};

	//the current window width
	var w_w				= $(window).width();

	var slide			= function(current,
	$pxs_slider,
	$pxs_bg3,
	$pxs_bg2,
	$pxs_bg1,
	speed,
	easing,
	easingBg){
		var slide_to	= parseInt(-w_w * current);
		$pxs_slider.stop().animate({
			left	: slide_to + 'px'
		},speed, easing);
		$pxs_bg3.stop().animate({
			left	: slide_to/2 + 'px'
		},speed, easingBg);
		$pxs_bg2.stop().animate({
			left	: slide_to/4 + 'px'
		},speed, easingBg);
		$pxs_bg1.stop().animate({
			left	: slide_to/8 + 'px'
		},speed, easingBg);
	}

	var highlight		= function($elem){
		$elem.siblings().removeClass('selected');
		$elem.addClass('selected');
	}

	var setWidths		= function($pxs_slider,
	$elems,
	total_elems,
	$pxs_bg1,
	$pxs_bg2,
	$pxs_bg3,
	one_image_w,
	$pxs_next,
	$pxs_prev){
		/*
		the width of the slider is the window width
		times the total number of elements in the slider
		 */
		var pxs_slider_w	= w_w * total_elems;
		$pxs_slider.width(pxs_slider_w + 'px');
		//each element will have a width = windows width
		$elems.width(w_w + 'px');
		/*
		we also set the width of each bg image div.
		The value is the same calculated for the pxs_slider
		 */
		$pxs_bg1.width(pxs_slider_w + 'px');
		$pxs_bg2.width(pxs_slider_w + 'px');
		$pxs_bg3.width(pxs_slider_w + 'px');

		/*
		both, the right and left of the
		navigation next and previous buttons will be:
		windowWidth/2 - imgWidth/2 + some margin
		(not to touch the image borders)
		 */
		var position_nav	= w_w/2 - one_image_w/2 + 3;
		$pxs_next.css('right', position_nav + 'px');
		$pxs_prev.css('left', position_nav + 'px');
	}

	$.fn.parallaxSlider.defaults = {
		auto			: 0,
		speed			: 1000,
		easing			: 'jswing',
		easingBg		: 'jswing',
		circular		: true,
		thumbRotation	: true
	};
	//easeInOutExpo,easeInBack
})(jQuery);
</pre>
<p>We also add the following script to initiate our slider:</p>
<pre class="brush:js">
$(function() {
	var $pxs_container	= $('#pxs_container');
	$pxs_container.parallaxSlider();
});
</pre>
<p>The options for the slider are the following:</p>
<ul>
<li>auto: How many seconds to periodically slide the content. If set to 0 then autoplay is turned off.</li>
<li>speed: Speed of each slide animation</li>
<li>easing: Easing effect for the slide animation</li>
<li>easingBg: Easing effect for the background animation</li>
<li>circular: Circular slider</li>
<li>thumbRotation: The thumbs will be randomly rotated</li>
</ul>
<p>And that&#8217;s all! We hope you enjoyed the tutorial and find it useful!</p>
<p><a class="demo" href="http://tympanus.net/Tutorials/ParallaxSlider/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/ParallaxSlider/ParallaxSlider.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/01/03/parallax-slider/feed/</wfw:commentRss>
		<slash:comments>93</slash:comments>
		</item>
		<item>
		<title>Portfolio Zoom Slider with jQuery</title>
		<link>http://tympanus.net/codrops/2010/12/27/portfolio-zoom-slider/</link>
		<comments>http://tympanus.net/codrops/2010/12/27/portfolio-zoom-slider/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 18:17:13 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[overlay]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[zoom]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=3206</guid>
		<description><![CDATA[View demoDownload source In this tutorial we are going to create some nice effects for a portfolio or similar website with jQuery. We will create a tiny slider and integrate it with the amazing Cloud Zoom plugin and the elegant Fancybox plugin. The idea is to give the user the option to view details of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Tutorials/PortfolioZoomSlider/" target="_blank"><img class="aligncenter size-full wp-image-3209" title="PortfolioZoomSlider" src="http://tympanus.net/codrops/wp-content/uploads/2010/12/PortfolioZoomSlider.jpg" alt="" width="580" height="315" /></a></p>
<p><a class="demo" href="http://tympanus.net/Tutorials/PortfolioZoomSlider/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/PortfolioZoomSlider/PortfolioZoomSlider.zip">Download source</a></p>
<p>In this tutorial we are going to create some nice effects for a portfolio or similar website with jQuery. We will create a tiny slider and integrate it with the amazing <a href="http://www.professorcloud.com/mainsite/cloud-zoom.htm" target="_blank">Cloud Zoom plugin</a> and the elegant <a href="http://fancybox.net/" target="_blank">Fancybox plugin</a>.</p>
<p>The idea is to give the user the option to view details of a portfolio item by zooming it on hover, and to allow a full view by clicking. Moreover, we want to have a couple of images for each item, hence we will create a slider.</p>
<p>When integrating jQuery scripts, it sometimes happens that there are conflicts, be it because of some shared attribute or because of some specific structure that is needed by each jQuery plugin. In this tutorial we will bump into some of these conflicts and we will adapt some lines of code in order to bypass them.</p>
<p>So, let&#8217;s start with the markup!</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>For each item we will have a div element. There we will add an element for the thumbnails slider which we will give the class &#8220;thumb_wrapper&#8221; and an element for the description with the respective class name:</p>
<pre class="brush:xml">&lt;div class="item"&gt;
	&lt;div class="thumb_wrapper"&gt;
		&lt;div class="thumb"&gt;
			&lt;ul&gt;
				&lt;li&gt;
					&lt;a href="images/formstack1.jpg"&gt;
						&lt;img src="images/thumbs/formstack1.jpg" alt="Formstack 1"/&gt;
					&lt;/a&gt;
				&lt;/li&gt;
				&lt;li&gt;...&lt;/li&gt;
				...
			&lt;/ul&gt;
		&lt;/div&gt;
		&lt;a class="prev" href="#"&gt;&lt;/a&gt;
		&lt;a class="next" href="#"&gt;&lt;/a&gt;
		&lt;span&gt;Hover to zoom, click to view&lt;/span&gt;
	&lt;/div&gt;
	&lt;div class="description"&gt;
		&lt;h2&gt;Portfolio Item&lt;/h2&gt;
		&lt;p&gt;Some description&lt;/p&gt;
	&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>The link element which wraps the image will have the href pointing to the large image. Both plugins that we are using take advantage of that structure. They will build their elements with the information provided in the href attribute.</p>
<p>Additonally, we will add the following attributes and class name to each link element:</p>
<pre class="brush:xml">&lt;a rev="group1" rel="zoomHeight:200, zoomWidth:400, adjustX: 10, adjustY:-4, position:'body'" class='cloud-zoom' href="images/formstack1.jpg"&gt;...&lt;/a&gt;
</pre>
<p>The &#8220;rel&#8221; attribute is actually used by both plugins but we will change the Fancybox plugin, so that it used the &#8220;rev&#8221; attribute instead. The Fancybox plugin can create a gallery if we give the same &#8220;rev&#8221; value to a group of images. So, our thumbnails in the first item will all have the &#8220;group1&#8243; rev value and the the thumbnails in the second item will have &#8220;group2&#8243; and so forth.<br />
For configuring the Cloud Zoom plugin, we will add some parameters to the &#8220;rel&#8221; attribute.<br />
For more information on the configuration of the plugins, please visit the <a href="http://www.professorcloud.com/mainsite/cloud-zoom.htm" target="_blank">Cloud Zoom plugin</a> and <a href="http://fancybox.net/" target="_blank">Fancybox plugin</a> websites.<br />
The <strong>position:&#8217;body&#8217;</strong> value is an adapted value that we will come to later, when we go into the jQuery.</p>
<p>Let&#8217;s look at the styling.</p>
<h3>The CSS</h3>
<p>First we will define the style for the item:</p>
<pre class="brush:css">.item{
	float:left;
	width:100%;
	clear:both;
	margin:35px 0px;
}
</pre>
<p>Now, we will position the thumb wrapper which contains the navigation and the thumbnail slider:</p>
<pre class="brush:css">.thumb_wrapper{
	width:290px;
	height:107px;
	position:relative;
	float:left;
	margin:20px 40px 0px 0px;
}
</pre>
<p>The navigation elements will be positioned absolutely. That&#8217;s why we needed to set the parent to a relative position. The common style for both navigation elements is:</p>
<pre class="brush:css">.thumb_wrapper a.prev,
.thumb_wrapper a.next{
	width:30px;
	height:30px;
	position:absolute;
	top:50%;
	margin-top:-15px;
	outline:none;
	cursor:pointer;
}
</pre>
<p>And the individual style for each navigation element is the following:</p>
<pre class="brush:css">.thumb_wrapper a.prev{
	left:0px;
	background:transparent url(../images/fancy_nav_left.png) no-repeat top left;
}
.thumb_wrapper a.next{
	right:0px;
	background:transparent url(../images/fancy_nav_right.png) no-repeat top left;
}
</pre>
<p>The style for the small info span under the slider:</p>
<pre class="brush:css">.thumb_wrapper span{
	display:block;
	text-align:center;
	font-size:11px;
	font-style:italic;
	margin-top:3px;
}
</pre>
<p>The thumb element is the container for the unordered list of thumbnails. We will set the overflow to hidden, since we don&#8217;t want our list to show:</p>
<pre class="brush:css">.thumb{
	margin-left:40px;
	width:210px;
	height:107px;
	overflow:hidden;
	-moz-box-shadow:1px 1px 3px #555;
	-webkit-box-shadow:1px 1px 3px #555;
	box-shadow:1px 1px 3px #555;
}
</pre>
<p>The ul for the thumbnails will have a dynamically calculated width which will overwrite the following one:</p>
<pre class="brush:css">.thumb ul{
	list-style:none;
	width:800px;
	height:107px;
}
</pre>
<p>The list items have to flow left so that we have all the thumbnails in a line. The idea is, to animate the ul to the right position, revealing the next/previous thumbnail in our &#8220;line&#8221;.</p>
<pre class="brush:css">.thumb ul li{
	float:left;
}
</pre>
<p>Let&#8217;s decorate the thumbnail images:</p>
<pre class="brush:css">.thumb ul li a img{
	border:5px solid #fff;
}
</pre>
<p>The description will be floating right of the slider:</p>
<pre class="brush:css">.description{
	width:620px;
	float:right;
}
</pre>
<p>And that was all the style! That&#8217;s take a look at the JavaScript.</p>
<h3>The JavaScript</h3>
<p>The main idea is to create a little slider where the user can navigate through the thumbnails of a portfolio item. Then, when hovering over the thumbnail, we want a zoomed version of the hovered part of the thumbnail to appear on the right side. When clicking on a thumbnail, we want the Fancybox to appear, allowing the user to view the full image and navigate through the set.</p>
<p>So, we will start by including the necessary stylesheets and scripts. First, we will add the stylesheets to the head of our HTML:</p>
<pre class="brush:xml">&lt;link rel="stylesheet" type="text/css" href="cloud-zoom/cloud-zoom.css" /&gt;
&lt;link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.4.css" /&gt;
</pre>
<p>Then, we will add all the scripts in the end of the HTML:</p>
<pre class="brush:xml">&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="fancybox/jquery.easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="fancybox/jquery.fancybox-1.3.4.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="cloud-zoom/cloud-zoom.1.0.2.js"&gt;&lt;/script&gt;
</pre>
<p>In our jQuery function we will first initialize the Fancybox and then we will define the functionality of the slider. As mentioned before, the Cloud Zoom plugin parameters are set in the &#8220;rel&#8221; attribute of the link element that wraps the thumbnail image.</p>
<p>Let&#8217;s initialize the Fancybox:</p>
<pre class="brush:js">$("#content .cloud-zoom").fancybox({
	'transitionIn'	:	'elastic',
	'transitionOut'	:	'none',
	'speedIn'		:	600,
	'speedOut'		:	200,
	'overlayShow'	:	true,
	'overlayColor'	:	'#000',
	'cyclic'		:	true,
	'easingIn'		:	'easeInOutExpo'
});
</pre>
<p>We need to deal with a conflict now, which is caused by the Cloud Zoom Plugin adding a div element on top of our link element. It conflicts with the Fancybox Plugin since we cannot click the link element anymore (it&#8217;s covered). So, we will add a little function that will trigger the click on the link element whenever we click on the div with the class &#8220;mousetrap&#8221; that gets generated by the Cloud Zoom Plugin:</p>
<pre class="brush:js">$("#content .mousetrap").live('click',function(){
	$(this).prev().trigger('click');
});
</pre>
<p>Now, we will define some variables for our slider:</p>
<pre class="brush:js">var $content	= $('#content'),
$thumb_list = $content.find('.thumb &gt; ul');
</pre>
<p>The slider ul needs to get a width assigned to it which will be the sum of the widths of each thumbnail inside. We will also define the click events on the navigation buttons:</p>
<pre class="brush:js">$thumb_list.each(function(){
	var $this_list	= $(this),
	total_w		= 0,
	loaded		= 0,
	//preload all the images first
	$images		= $this_list.find('img'),
	total_images= $images.length;
	$images.each(function(){
		var $img	= $(this);
		$('<img alt="" />').load(function(){
			++loaded;
			if (loaded == total_images){
				$this_list.data('current',0).children().each(function(){
					total_w	+= $(this).width();
				});
				$this_list.css('width', total_w + 'px');

				//next / prev events

				$this_list.parent()
				.siblings('.next')
				.bind('click',function(e){
					var current = $this_list.data('current');
					if(current == $this_list.children().length -1) return false;
					var	next	= ++current,
					ml		= -next * $this_list.children(':first').width();

					$this_list.data('current',next)
					.stop()
					.animate({
						'marginLeft'	: ml + 'px'
					},400);
					e.preventDefault();
				})
				.end()
				.siblings('.prev')
				.bind('click',function(e){
					var current = $this_list.data('current');
					if(current == 0) return false;
					var	prev	= --current,
					ml		= -prev * $this_list.children(':first').width();

					$this_list.data('current',prev)
					.stop()
					.animate({
						'marginLeft'	: ml + 'px'
					},400);
					e.preventDefault();
				});
			}
		}).attr('src',$img.attr('src'));
	});
});
</pre>
<p>And that&#8217;s all! We adapted the Fancybox script slightly in order to show the navigation arrows constantly when hovering over the full image. Also, we adapted the z-indexes of the Fancybox elements in the stylesheet (we added 10000 to each z-index) in order to work with the other elements in the page and the Cloud Zoom elements. In the Cloud Zoom script we added another case for the position, since we need to append the zoom element to the body using the absolute positions of the thumbnails.</p>
<p>We hope you enjoyed the tutorial and find it useful!</p>
<p><a class="demo" href="http://tympanus.net/Tutorials/PortfolioZoomSlider/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/PortfolioZoomSlider/PortfolioZoomSlider.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2010/12/27/portfolio-zoom-slider/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>Collective: Tiny Circleslider</title>
		<link>http://tympanus.net/codrops/2010/11/12/collective-tiny-circleslider/</link>
		<comments>http://tympanus.net/codrops/2010/11/12/collective-tiny-circleslider/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 10:40:40 +0000</pubDate>
		<dc:creator>Community</dc:creator>
				<category><![CDATA[Collective]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[slider]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=3071</guid>
		<description><![CDATA[Tiny Circleslider is a circular slider / carousel. That was built to provide webdevelopers with a cool but subtle alternative to all those standard carousels. Tiny Circleslider can blend in on any wepage. It was built using the javascript jQuery library. Source http://baijs.nl/tinycircleslider/ Demo http://baijs.nl/tinycircleslider/]]></description>
			<content:encoded><![CDATA[<p><!-- Digg Digg Disabled --></p>
<p><a href="http://baijs.nl/tinycircleslider/"><img src="http://tympanus.net/codrops/wp-content/uploads/2010/11/circleslider.jpg" alt="" title="circleslider" width="580" height="312" class="aligncenter size-full wp-image-3072" /></a></p>
<p>Tiny Circleslider is a circular slider / carousel. That was built to provide webdevelopers with a cool but subtle alternative to all those standard carousels. Tiny Circleslider can blend in on any wepage. It was built using the javascript jQuery library. </p>
<h3>Source</h3>
<p><a href="http://baijs.nl/tinycircleslider/" target="_blank">http://baijs.nl/tinycircleslider/</a></p>
<h3>Demo</h3>
<p><a href="http://baijs.nl/tinycircleslider/" target="_blank">http://baijs.nl/tinycircleslider/</a></p>
<div style="margin-bottom:100px;"></div>
<p><!-- wp_ad_camp_1 --></p>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2010/11/12/collective-tiny-circleslider/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  tympanus.net/codrops/tag/slider/feed/ ) in 0.32427 seconds, on Feb 7th, 2012 at 12:18 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 7th, 2012 at 1:18 pm UTC -->
