<?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; image</title>
	<atom:link href="http://tympanus.net/codrops/tag/image/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>CSS3 Lightbox</title>
		<link>http://tympanus.net/codrops/2011/12/26/css3-lightbox/</link>
		<comments>http://tympanus.net/codrops/2011/12/26/css3-lightbox/#comments</comments>
		<pubDate>Mon, 26 Dec 2011 12:36:30 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[thumbnails]]></category>
		<category><![CDATA[transition]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=6953</guid>
		<description><![CDATA[Today we want to show you how to create a neat lightbox effect using only CSS. The idea is to have some thumbnails that are clickable, and once clicked, the respective large image is shown. Using CSS transitions and animations, we can make the large image appear in a fancy way. ]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Tutorials/CSS3Lightbox/"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/12/CSS3Lightbox.jpg" alt="CSS3Lightbox" width="580" height="315" class="aligncenter size-full wp-image-6959" /></a><br />
<a class="demo" href="http://tympanus.net/Tutorials/CSS3Lightbox/">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/CSS3Lightbox/CSS3Lightbox.zip">Download source</a></p>
<p>Today we want to show you how to create a neat lightbox effect using only CSS. The idea is to have some thumbnails that are clickable, and once clicked, the respective large image is shown. Using CSS transitions and animations, we can make the large image appear in a fancy way. </p>
<p>With the help of the pseudo-class <a href="http://www.w3.org/TR/css3-selectors/#target-pseudo">:target</a>, we will be able to show the lightbox images and navigate through them.</p>
<p>The beautiful images are by <a href="http://www.behance.net/qstra">Joanna Kustra</a> and they are licensed under the <a href="http://creativecommons.org/licenses/by-nc/3.0/">Attribution-NonCommercial 3.0 Unported Creative Commons License</a>.</p>
<p><em>Please note that this will only work with browsers that support the :target pseudo class.</em></p>
<p>Let&#8217;s do it!</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>The Markup</h3>
<p>We want to show a set of thumbnails, each one having a title that will appear on hover. When clicking on a thumbnail, we want to show a large version of the image in an overlay container that will make the background a bit more opaque. So, let&#8217;s use an unordered list where each list item will contain a thumbnail and a division for the overlay with the respective large version of the image:</p>
<pre class="brush:xml">
&lt;ul class="lb-album"&gt;
	&lt;li&gt;
		&lt;a href="#image-1"&gt;
			&lt;img src="images/thumbs/1.jpg" alt="image01"&gt;
			&lt;span&gt;Pointe&lt;/span&gt;
		&lt;/a&gt;
		&lt;div class="lb-overlay" id="image-1"&gt;
			&lt;img src="images/full/1.jpg" alt="image01" /&gt;
			&lt;div&gt;
				&lt;h3&gt;pointe &lt;span&gt;/point/&lt;/h3&gt;
				&lt;p&gt;Dance performed on the tips of the toes&lt;/p&gt;
				&lt;a href="#image-10" class="lb-prev"&gt;Prev&lt;/a&gt;
				&lt;a href="#image-2" class="lb-next"&gt;Next&lt;/a&gt;
			&lt;/div&gt;
			&lt;a href="#page" class="lb-close"&gt;x Close&lt;/a&gt;
		&lt;/div&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;!-- ... --&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p><img src="http://tympanus.net/codrops/wp-content/uploads/2011/12/CSS3Lightbox02.jpg" alt="CSS3Lightbox01" width="580" height="246" class="aligncenter size-full wp-image-6957" /></p>
<p>The anchor for the thumbnail will point to the element with the id <strong>image-1</strong> which is the division with the class <strong>lb-overlay</strong>. In order to navigate through the images, we will add two link elements that point to the previous and next (large) image.<br />
In order to &#8220;close&#8221; the lightbox, we will somply click on the link with the class <strong>lb-close</strong> which points to the element with the ID <strong>page</strong> which is our body.</p>
<p><em>Note that we only use a navigation in the last demo.</em></p>
<p>Let&#8217;s beautify this naked markup.</p>
<h3>The CSS</h3>
<p><em>I&#8217;ll omit the vendor prefixes for some of the new properties here in order not to bloat the tutorial. You can, of course, find them in the download files.</em></p>
<p>Let&#8217;s give some basic layout to our unordered list and the thumbnails:</p>
<pre class="brush:css">
.lb-album{
	width: 900px;
	margin: 0 auto;
	font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;
}
.lb-album li{
	float: left;
	margin: 5px;
	position: relative;
}
.lb-album li > a,
.lb-album li > a img{
	display: block;
}
.lb-album li > a{
	width: 150px;
	height: 150px;
	position: relative;
	padding: 10px;
	background: #f1d2c2;
	box-shadow: 1px 1px 2px #fff, 1px 1px 2px rgba(158,111,86,0.3) inset;
	border-radius: 4px;
}
</pre>
<p>The title for each thumbnail will be invisible and we&#8217;ll add a transitions for the opacity which will change to 1 once we hover over the thumbnail anchor. We&#8217;ll use a smooth radial gradient as background:</p>
<pre class="brush:css">
.lb-album li > a span{
	position: absolute;
	width: 150px;
	height: 150px;
	top: 10px;
	left: 10px;
	text-align: center;
	line-height: 150px;
	color: rgba(27,54,81,0.8);
	text-shadow: 0px 1px 1px rgba(255,255,255,0.6);
	font-size: 24px;
	opacity: 0;
	background:
		radial-gradient(
			center,
			ellipse cover,
			rgba(255,255,255,0.56) 0%,
			rgba(241,210,194,1) 100%
		);
	transition: opacity 0.3s linear;
}
.lb-album li > a:hover span{
	opacity: 1;
}
</pre>
<p>The overlay will have the same radial gradient and we&#8217;ll set its position to fixed, with zero height and width:</p>
<pre class="brush:css">
.lb-overlay{
	width: 0px;
	height: 0px;
	position: fixed;
	overflow: hidden;
	left: 0px;
	top: 0px;
	padding: 0px;
	z-index: 99;
	text-align: center;
	background:
		radial-gradient(
			center,
			ellipse cover,
			rgba(255,255,255,0.56) 0%,
			rgba(241,210,194,1) 100%
		);
}
</pre>
<p>Once we click on a thumbnail, we&#8217;ll cover the whole screen with the overlay, but first, let&#8217;s take a look at the children.</p>
<p>Let&#8217;s style the division for the main title and the description:</p>
<pre class="brush:css">
.lb-overlay > div{
	position: relative;
	color: rgba(27,54,81,0.8);
	width: 550px;
	height: 80px;
	margin: 40px auto 0px auto;
	text-shadow: 0px 1px 1px rgba(255,255,255,0.6);
}
.lb-overlay div h3,
.lb-overlay div p{
	padding: 0px 20px;
	width: 200px;
	height: 60px;
}
.lb-overlay div h3{
	font-size: 36px;
	float: left;
	text-align: right;
	border-right: 1px solid rgba(27,54,81,0.4);
}
.lb-overlay div h3 span,
.lb-overlay div p{
	font-size: 16px;
	font-family: Constantia, Palatino, serif;
	font-style: italic;
}
.lb-overlay div h3 span{
	display: block;
	line-height: 6px;
}
.lb-overlay div p{
	font-size: 14px;
	text-align: left;
	float: left;
	width: 260px;
}
</pre>
<p>We&#8217;ll position the link element for closing the lightbox absolutely above the image:</p>
<pre class="brush:css">
.lb-overlay a.lb-close{
	background: rgba(27,54,81,0.8);
	z-index: 1001;
	color: #fff;
	position: absolute;
	top: 43px;
	left: 50%;
	font-size: 15px;
	line-height: 26px;
	text-align: center;
	width: 50px;
	height: 23px;
	overflow: hidden;
	margin-left: -25px;
	opacity: 0;
	box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
}
</pre>
<p>The image will have a maximum height of 100%. That&#8217;s one way of making the image somewhat reponsive and nicely fittin into the viewport (i.e our overlay). We&#8217;ll also add a transition for the opacity level. Once we &#8220;open&#8221; a large image, the opacity will get animated. We&#8217;ll see later how we can use an animation for the image.</p>
<pre class="brush:css">
.lb-overlay img{
	max-height: 100%;
	position: relative;
	opacity: 0;
	box-shadow: 0px 2px 7px rgba(0,0,0,0.2);
	transition: opacity 0.5s linear;
}
</pre>
<p>Let&#8217;s style the navigation elements:</p>
<pre class="brush:css">
.lb-prev, .lb-next{
	text-indent: -9000px;
	position: absolute;
	top: -32px;
	width: 24px;
	height: 25px;
	left: 50%;
	opacity: 0.8;
}
.lb-prev:hover, .lb-next:hover{
	opacity: 1;
}
.lb-prev{
	margin-left: -30px;
	background: transparent url(../images/arrows.png) no-repeat top left;
}
.lb-next{
	margin-left: 6px;
	background: transparent url(../images/arrows.png) no-repeat top right;
}
</pre>
<p><img src="http://tympanus.net/codrops/wp-content/uploads/2011/12/CSS3Lightbox01.jpg" alt="CSS3Lightbox01" width="580" height="400" class="aligncenter size-full wp-image-6956" /></p>
<p>When we click on a thumbnail anchor, it will point to the respective large version of the image which is in the division with the class <strong>lb-overlay</strong>. So, in order to address this element we can use the pseudo class <strong>:target</strong>. We&#8217;ll add a padding to the overlay and &#8220;stretch it&#8221; over the whole viewport by setting the width and height to auto (it&#8217;s actually not needed explicitely) and set the right and bottom to 0px. Remember, we&#8217;ve already set the top and left before. </p>
<pre class="brush:css">
.lb-overlay:target {
	width: auto;
	height: auto;
	bottom: 0px;
	right: 0px;
	padding: 80px 100px 120px 100px;
}
</pre>
<p>Now we will also set the opacity of the image and the closing link to 1. The image will fade in, because we&#8217;ve set a transition:</p>
<pre class="brush:css">
.lb-overlay:target img,
.lb-overlay:target a.lb-close{
	opacity: 1;
}
</pre>
<p>And that&#8217;s all the style!<br />
Let&#8217;s take a look at the two alternatives that we are using in demo 1 and demo 2.</p>
<p>In the first demo we make the image appear by using an animation that scales it up and increases it&#8217;s opacity value:</p>
<pre class="brush:css">
.lb-overlay:target img {
	animation: fadeInScale 1.2s ease-in-out;
}
@keyframes fadeInScale {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
</pre>
<p>In the second demo we&#8217;ll create the opposite effect, i.e. scale the image down:</p>
<pre class="brush:css">
.lb-overlay:target img {
	animation: scaleDown 1.2s ease-in-out;
}
@-webkit-keyframes scaleDown {
  0% { transform: scale(10,10); opacity: 0; }
  100% { transform: scale(1,1); opacity: 1; }
}
</pre>
<h3>Demos</h3>
<ul>
<li><strong><a href="http://tympanus.net/Tutorials/CSS3Lightbox/index.html">Demo 1: Scale-up / fade-in animation</a></strong></li>
<li><strong><a href="http://tympanus.net/Tutorials/CSS3Lightbox/index2.html">Demo 2: Scale-down / fade-in animation</a></strong></li>
<li><strong><a href="http://tympanus.net/Tutorials/CSS3Lightbox/index3.html">Demo 3: Fade-in &amp; navigation</a></strong></li>
</ul>
<p><em>You will see that each browser performs quite differently when it comes to the transitions/animations. Adjusting duration, timing functions and delays, one can make the effects smoother, i.e. you can change the timing for Firefox only by changing the -moz- properties. </em></p>
<p>And that&#8217;s it! I hope you enjoyed this tutorial and find it inspiring! </p>
<p><a class="demo" href="http://tympanus.net/Tutorials/CSS3Lightbox/">View demo</a> <a class="download" href="http://tympanus.net/Tutorials/CSS3Lightbox/CSS3Lightbox.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/12/26/css3-lightbox/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>Fullscreen Image Blur Effect with HTML5</title>
		<link>http://tympanus.net/codrops/2011/11/18/fullscreen-image-blur-effect-with-html5/</link>
		<comments>http://tympanus.net/codrops/2011/11/18/fullscreen-image-blur-effect-with-html5/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 15:43:49 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[blur]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[fullscreen]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=6489</guid>
		<description><![CDATA[Today we want to share a neat image blur effect with you. Using canvas, we want to blur images on the transition to another one, creating a smooth effect. ]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Development/FullscreenImageBlurEffect/" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/11/FullscreenImageBlur.jpg" alt="FullscreenImageBlur" title="" width="580" height="315" class="aligncenter size-full wp-image-6495" /></a><br />
<a class="demo" href="http://tympanus.net/Development/FullscreenImageBlurEffect/" >View demo</a> <a class="download" href="http://tympanus.net/Development/FullscreenImageBlurEffect/FullscreenImageBlurEffect.zip">Download source</a> </p>
<p>Today we want to share a neat image blur effect with you. Using canvas, we want to blur images on the transition to another one, creating a smooth effect. </p>
<p>We will be using <a href="http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html" target="_blank">Stack Blur</a>, which is a fast, almost Gaussian blur for Canvas by Mario Klingemann from <a href="http://www.quasimondo.com/" target="_blank">Quasimondo</a>.</p>
<p>The images used in the demo are by Geoff Peters. They are licensed under the <a title="Attribution 2.0 Generic (CC BY 2.0)" href="http://creativecommons.org/licenses/by/2.0/deed.en" target="_blank">Attribution 2.0 Generic (CC BY 2.0) License</a>. </p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>How it works</h3>
<p>The main idea is to add some images in our structure that will serve as background images. We will add the canvas element which will contain a blurred version of the image. When we navigate, we&#8217;ll add the blurred canvas behind the current image and fade the current image out. With the blurred canvas image now visible, we can either show the new image immediately (unblurred) or show it blurred and then &#8220;sharpen&#8221; it.</p>
<p>You can set that by changing the <strong>variation</strong> between 1 and 2:</p>
<pre class="brush:js">
animOptions			= { speed : 700, variation : 1, blurFactor : 10 }
</pre>
<p>The speed is the animation speed between each transition (from normal to blurred) and the blurFactor is basically the radius for the blur effect used in <a href="http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html" target="_blank">Stack Blur</a>.</p>
<h3>Demos</h3>
<ul>
<li><strong><a href="http://tympanus.net/Development/FullscreenImageBlurEffect/index2.html" target="_blank">Demo 1:</a></strong> Here we use variation 2, showing the coming image without blurring it first. </li>
<li><strong><a href="http://tympanus.net/Development/FullscreenImageBlurEffect/index.html" target="_blank">Demo 2:</a></strong> In this demo we use variation 1 for blurring both, the current image and the coming one. </li>
</ul>
<p><strong>We hope you liked our little experiment and find it inspiring and useful! </strong></p>
<p><a class="demo" href="http://tympanus.net/Development/FullscreenImageBlurEffect/" >View demo</a> <a class="download" href="http://tympanus.net/Development/FullscreenImageBlurEffect/FullscreenImageBlurEffect.zip">Download source</a> </p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/11/18/fullscreen-image-blur-effect-with-html5/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Fullscreen Image 3D Effect with CSS3 and jQuery</title>
		<link>http://tympanus.net/codrops/2011/10/31/fullscreen-image-3d-effect/</link>
		<comments>http://tympanus.net/codrops/2011/10/31/fullscreen-image-3d-effect/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 11:57:38 +0000</pubDate>
		<dc:creator>Pedro Botelho</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[background-image]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[fullscreen]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=6211</guid>
		<description><![CDATA[Today we want to share one of our CSS 3D Transforms experiments with you. The idea is to show an image's fullscreen version by rotating two blocks in three-dimensional space. The faces of the blocks being rotated to the front will show the fullscreen image.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Development/FullscreenImage3DEffect/"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/FullscreenImage3dEffect.jpg" alt="Fullscreen3DImageEffect" width="580" height="315" class="aligncenter size-full wp-image-6216" /></a></p>
<p><a class="demo" href="http://tympanus.net/Development/FullscreenImage3DEffect/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Development/FullscreenImage3DEffect/FullscreenImage3DEffect.zip">Download source</a></p>
<p>Today we want to share one of our CSS 3D Transforms experiments with you. The idea is to show an image&#8217;s fullscreen version by rotating two blocks in three-dimensional space. The faces of the blocks being rotated to the front will show the fullscreen image.</p>
<p><strong>Please note that you can only see the cool 3d effect in a browser that supports those CSS3 properties (currently Chrome and Safari).</strong></p>
<p><em>You can check out the video of the effect here: <a href="http://www.screenr.com/Onls" target="_blank">http://www.screenr.com/Onls</a></em></p>
<p>We&#8217;ll be using <a href="http://www.modernizr.com/" target="_blank">Modernizr</a> in order to know if the browser supports the used CSS3 properties. For the ones that don&#8217;t we&#8217;ll use a simple fallback.</p>
<p>The images used in the demo are by <a href="http://www.flickr.com/photos/jeeheon/" title="Jeeheon's Flickr Photostream" target="_blank">Jeeheon</a>. They are licensed under the <a title="Attribution 2.0 Generic (CC BY 2.0)" href="http://creativecommons.org/licenses/by/2.0/deed.en" target="_blank">Attribution 2.0 Generic (CC BY 2.0) License</a>. </p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>How it works</h3>
<p>In our little experiment, we&#8217;ll add out images to a wrapper with the class <strong>fd-wrapper</strong>:<br />
HTML</p>
<pre class="brush:xml">
&lt;div id="fd-wrapper" class="fd-wrapper"&gt;
	&lt;img src="images/medium/1.jpg" data-bgimg="images/large/1.jpg" alt="image01" title="Love Will Tear Us Apart" /&gt;
	&lt;img src="images/medium/2.jpg" data-bgimg="images/large/2.jpg" alt="image02" title="Just Can't Get Enough" /&gt;
	&lt;img src="images/medium/3.jpg" data-bgimg="images/large/3.jpg" alt="image03" title="In a Manner of Speaking" /&gt;
	&lt;img src="images/medium/4.jpg" data-bgimg="images/large/4.jpg" alt="image04" title="Guns of Brixton" /&gt;
	&lt;img src="images/medium/5.jpg" data-bgimg="images/large/5.jpg" alt="image05" title="This Is Not a Love Song" /&gt;
	&lt;img src="images/medium/6.jpg" data-bgimg="images/large/6.jpg" alt="image06" title="Making Plans for Nigel" /&gt;
&lt;/div&gt;
</pre>
<p>The information about the fullscreen image&#8217;s path will be in the <strong>data-bgimg</strong> attribute.<br />
We&#8217;ll use the images in an HTML structure that we define in a jQuery template. That structure will consist of two boxes, an upper and a lower one, each having six faces of which the frontal ones are shown initially. </p>
<p>When we click on the icon to show the fullscreen image, the upper rectangle will rotate up, revealing its bottom face, while the lower box will rotate down, showing us its top face. The bottom face of the upper rectangle will have the upper part of the fullscreen image as a background image and the top face of the lower rectangle will have the lower part of it:</p>
<p><img src="http://tympanus.net/codrops/wp-content/uploads/2011/10/FullscreenImage3dEffect_01.jpg" alt="Fullscreen Image 3d Effect" width="580" height="313" class="aligncenter size-full wp-image-6213" /></p>
<h3>Options</h3>
<p>There are the following default options:</p>
<pre class="brush:js">
current		: 0,
// index of current image

width		: 600,
// image's width

height		: 400,
// image's height

perspective	: 550,
// the webkit-perspective value

speed		: 750,
// rotation transition speed

easing		: 'ease-in-out',
// rotation transition easing 	

onLoad		: function() { return false; }
// fired when the slideshow is initialized
</pre>
<p>Don&#8217;t forget to check out the video of the effect here if your browser doesn&#8217;t support the CSS3 properties: <a href="http://www.screenr.com/Onls" target="_blank">http://www.screenr.com/Onls</a></p>
<p><strong>We hope you like our little experiment and find it inspiring! </strong></p>
<p><a class="demo" href="http://tympanus.net/Development/FullscreenImage3DEffect/" target="_blank">View demo</a> <a class="download" href="http://tympanus.net/Development/FullscreenImage3DEffect/FullscreenImage3DEffect.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/10/31/fullscreen-image-3d-effect/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Sliding Background Image Menu with jQuery</title>
		<link>http://tympanus.net/codrops/2011/07/03/sliding-background-image-menu/</link>
		<comments>http://tympanus.net/codrops/2011/07/03/sliding-background-image-menu/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 17:36:34 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[background-image]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[sliding]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=4977</guid>
		<description><![CDATA[Today we want to share another jQuery menu with you. This menu will have several panels, each one corresponding to a different background image that will show on all panels when we hover over a panel label.  Also, a submenu will slide out from the bottom. This menu comes with some configuration possibilities, such as size of the image, the hover effect and custom default states.]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example5.html" target="_blank"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/07/SlidingBackgroundImageMenu.jpg" alt="" title="SlidingBackgroundImageMenu" width="580" height="315" class="aligncenter size-full wp-image-4978" /></a><br />
<a class="demo" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example5.html" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/SlidingBackgroundImageMenu.zip">Download source</a><br />
Today we want to share another jQuery menu with you. This menu will have several panels, each one corresponding to a different background image that will show on all panels when we hover over a panel label.  Also, a submenu will slide out from the bottom. This menu comes with some configuration possibilities, such as the size of the image, the hover effect and custom default states.</p>
<p>The idea of this navigation is based on the <a target="_blank" href="http://tympanus.net/codrops/2010/05/05/beautiful-background-image-navigation-with-jquery/">Beautiful Background Image Navigation with jQuery</a>, a tutorial that had a similar effect. Since it was very popular and a lot of our readers asked for some very useful additions, we decided to revamp it and make it easier to customize.</p>
<p>The beautiful gastronomy photography is by Manoel Petry:<br />
<a target="_blank" href="http://www.flickr.com/people/manoelpetry/">Manoel Petry&#8217;s Flickr Photostream</a><br />
<a target="_blank" href="http://www.manoelpetry.com/">Manoel Petry&#8217;s Website</a><br />
The images are licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/">Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Generic License</a>.</p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>Examples</h3>
<p>Take a look at all the examples (you can also navigate from them to all the other demos):</p>
<ul>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example1.html">Show/hide</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example2.html">Fade</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example3.html">Sequential fade</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example4.html">Side slide</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example4_1.html">Side slide (bounce)</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example5.html">Sequential slide</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example6.html">Up/down</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example7.html">Sequential up/down</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example8.html">Alternating up/down</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example8_1.html">Alternating up/down (2)</a></li>
<li><a target="_blank" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example9.html">Sequential alternating up/down</a></li>
</ul>
<p>The HTML structure consists of the &#8220;sbi_container&#8221; which will have all the panels inside:</p>
<pre class="brush:xml">
&lt;div id="sbi_container" class="sbi_container"&gt;
	&lt;div class="sbi_panel" data-bg="images/1.jpg"&gt;
		&lt;a href="#" class="sbi_label"&gt;About&lt;/a&gt;
		&lt;div class="sbi_content"&gt;
			&lt;ul&gt;
				&lt;li&gt;&lt;a href="#"&gt;Subitem&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a href="#"&gt;Subitem&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a href="#"&gt;Subitem&lt;/a&gt;&lt;/li&gt;
			&lt;/ul&gt;
		&lt;/div&gt;
	&lt;/div&gt;
	&lt;div class="sbi_panel" data-bg="images/2.jpg"&gt;
		...
	&lt;/div&gt;
	...
&lt;/div&gt;
</pre>
<p>The &#8220;data-bg&#8221; attribute contains the path to the background image that will appear when hovering over the label of the respective panel.</p>
<p>Let&#8217;s take a look at an example for using the alternating vertical up/down sliding effect:</p>
<pre class="brush:js">
$('#sbi_container').bgImageMenu({
	defaultBg	: 'images/default.jpg',
	menuSpeed	: 300,
	border		: 1,
	type		: {
		mode		: 'verticalSlideAlt',
		speed		: 450,
		easing		: 'easeOutBack'
	}
});
</pre>
<p>The following parameters can be used/set:<br />
<strong>defaultBg:</strong> the default image shown when no label is hovered<br />
<strong>pos:</strong> if no defaultBg set, pos will indicate the panel that should be shown/open<br />
<strong>width:</strong> the width of the container and the images (they should all be of the same size)<br />
<strong>height:</strong> the height of the container and the images<br />
<strong>border:</strong> the width of the margin between the panels<br />
<strong>menuSpeed:</strong> the speed with which the menu should slide up</p>
<p><strong>mode:</strong> the type of animation; you can use def | fade | seqFade | horizontalSlide | seqHorizontalSlide | verticalSlide | seqVerticalSlide | verticalSlideAlt | seqVerticalSlideAlt<br />
<strong>speed:</strong> the speed of the panel animation<br />
<strong>easing:</strong> the easing effect for the animation<br />
<strong>seqfactor:</strong> delay between each item animation for seqFade | seqHorizontalSlide | seqVerticalSlide | seqVerticalSlideAlt </p>
<p>We hope you find this little menu interesting and useful, enjoy!</p>
<p><a class="demo" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/example5.html" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Development/SlidingBackgroundImageMenu/SlidingBackgroundImageMenu.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/07/03/sliding-background-image-menu/feed/</wfw:commentRss>
		<slash:comments>83</slash:comments>
		</item>
		<item>
		<title>Collective: AJAX-ZOOM Revised: 360° Spin, Zoom &amp; Pan wth jQuery</title>
		<link>http://tympanus.net/codrops/2011/01/17/collective-ajax-zoom-revised-360%c2%b0-spin-zoom-pan-wth-jquery/</link>
		<comments>http://tympanus.net/codrops/2011/01/17/collective-ajax-zoom-revised-360%c2%b0-spin-zoom-pan-wth-jquery/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 11:24:21 +0000</pubDate>
		<dc:creator>Community</dc:creator>
				<category><![CDATA[Collective]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[rotation]]></category>
		<category><![CDATA[zoom]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=3671</guid>
		<description><![CDATA[The revised version of AJAX-ZOOM supports 360° object rotation. Integration has been substantially simplified. Some additional UI controls have been added as optional features for zooming and spinning. Moreover, it now works on iPhone / iPad and other touch devices. Magento integration guide will be released shortly. Source http://www.ajax-zoom.com/ Demo http://www.ajax-zoom.com/examples/example15.php]]></description>
			<content:encoded><![CDATA[<p><!-- Digg Digg Disabled --></p>
<p><a href="http://www.ajax-zoom.com/"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/01/ajax-zoom.jpg" alt="" title="ajax-zoom" width="580" height="388" class="aligncenter size-full wp-image-3672" /></a></p>
<p>The revised version of AJAX-ZOOM supports 360° object rotation. Integration has been substantially simplified. Some additional UI controls have been added as optional features for zooming and spinning. Moreover, it now works on iPhone / iPad and other touch devices. Magento integration guide will be released shortly.</p>
<h3>Source</h3>
<p><a href="http://www.ajax-zoom.com/">http://www.ajax-zoom.com/</a></p>
<h3>Demo</h3>
<p><a href="http://www.ajax-zoom.com/examples/example15.php" target="_blank">http://www.ajax-zoom.com/examples/example15.php</a><br />
<br/></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/01/17/collective-ajax-zoom-revised-360%c2%b0-spin-zoom-pan-wth-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Collective: Close Pixelate</title>
		<link>http://tympanus.net/codrops/2011/01/12/collective-close-pixelate/</link>
		<comments>http://tympanus.net/codrops/2011/01/12/collective-close-pixelate/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 10:35:58 +0000</pubDate>
		<dc:creator>Community</dc:creator>
				<category><![CDATA[Collective]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=3549</guid>
		<description><![CDATA[&#8220;Inspired by American portrait painter Chuck Close, this script converts an image into a pixelated version using an HTML5 canvas element. It&#8217;s basically a simple demo for canvas &#8220;imageData&#8221; functionality.&#8221; David DeSandro Created by David DeSandro Source http://desandro.com/resources/close-pixelate/ Demo http://desandro.com/resources/close-pixelate/]]></description>
			<content:encoded><![CDATA[<p><!-- Digg Digg Disabled --></p>
<p><a href="http://desandro.com/resources/close-pixelate/"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/01/pixelate.jpg" alt="" title="pixelate" width="580" height="398" class="aligncenter size-full wp-image-3550" /></a></p>
<p>&#8220;Inspired by American portrait painter Chuck Close, this script converts an image into a pixelated version using an HTML5 canvas element. It&#8217;s basically a simple demo for canvas <a href="https://developer.mozilla.org/En/HTML/Canvas/Pixel_manipulation_with_canvas">&#8220;imageData&#8221;</a> functionality.&#8221; <em>David DeSandro</em></p>
<p>Created by</p>
<h2>David DeSandro</h2>
<h3>Source</h3>
<p><a href="http://desandro.com/resources/close-pixelate/">http://desandro.com/resources/close-pixelate/</a></p>
<h3>Demo</h3>
<p><a href="http://desandro.com/resources/close-pixelate/" target="_blank">http://desandro.com/resources/close-pixelate/</a><br />
<br/></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/01/12/collective-close-pixelate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Collective: Pirobox Extended</title>
		<link>http://tympanus.net/codrops/2011/01/08/collective-pirobox-extended/</link>
		<comments>http://tympanus.net/codrops/2011/01/08/collective-pirobox-extended/#comments</comments>
		<pubDate>Sat, 08 Jan 2011 09:35:50 +0000</pubDate>
		<dc:creator>Community</dc:creator>
				<category><![CDATA[Collective]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=3395</guid>
		<description><![CDATA[Hello everybody, this is an advanced version of pirobox. I implemented a few things more than the previous version. One of the most important things is the ability to open any kind of files, from inLine content to the swf files, from simple images to pdf files. Other things are: automatic image resizing and drag [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Digg Digg Disabled --><br />
<a href="http://www.pirolab.it/pirobox/"><img src="http://tympanus.net/codrops/wp-content/uploads/2011/01/pirobox.gif" alt="" title="pirobox" width="580" height="310" class="aligncenter size-full wp-image-3396" /></a></p>
<p>Hello everybody, this is an advanced version of pirobox.<br />
I implemented a few things more than the previous version. One of the most important things is the ability to open any kind of files, from inLine content to the swf files, from simple images to pdf files. Other things are: automatic image resizing and drag and drop.</p>
<p>Browser compatibility = FireFox 2+, Opera9.5+, Chrome, Safari (Mac/Windows),IE 7+.</p>
<p>I really hope that my script Pirobox can be fun and usefull for you. Enjoy the code with jQuery</p>
<h3>Source</h3>
<p><a href="http://www.pirolab.it/pirobox/">http://www.pirolab.it/pirobox/</a></p>
<h3>Demo</h3>
<p><a href="http://www.pirolab.it/pirobox/" target="_blank">http://www.pirolab.it/pirobox/</a><br />
<br/></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2011/01/08/collective-pirobox-extended/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Collective: Use jQuery to create an easy-to-browse screencast library</title>
		<link>http://tympanus.net/codrops/2010/09/28/collective-use-jquery-to-create-an-easy-to-browse-screencast-library/</link>
		<comments>http://tympanus.net/codrops/2010/09/28/collective-use-jquery-to-create-an-easy-to-browse-screencast-library/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 07:09:38 +0000</pubDate>
		<dc:creator>Community</dc:creator>
				<category><![CDATA[Collective]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=2773</guid>
		<description><![CDATA[A lightbox-style image and video viewer for websites with jQuery. You are bound to love this little plugin, and its many features. Do give this one a go, you won’t be disappointed. I myself am a big fan of the skin: “top_menu” option, which allows your visitors to concentrate on the screencast only (by placing [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Digg Digg Disabled --></p>
<p><a href="http://shoogledesigns.com/blog/2010/09/27/use-jquery-to-create-an-easy-to-browse-screencast-library/"><img src="http://tympanus.net/codrops/wp-content/uploads/2010/09/screencast.gif" alt="" title="screencast" width="580" height="311" class="aligncenter size-full wp-image-2775" /></a></p>
<p>A lightbox-style image and video viewer for websites with jQuery.<br />
You are bound to love this little plugin, and its many features. Do give this one a go, you won’t be disappointed. I myself am a big fan of the skin: “top_menu”  option, which allows your visitors to concentrate on the screencast only (by placing the rest of the site in a semi-darkness), while letting them skip to next/previous video and informing them on the screencast sequential info.</p>
<h3>Source</h3>
<p><a href="http://shoogledesigns.com/blog/2010/09/27/use-jquery-to-create-an-easy-to-browse-screencast-library/" target="_blank">http://shoogledesigns.com/blog/2010/09/27/use-jquery-to-create-an-easy-to-browse-screencast-library/</a></p>
<h3>Demo</h3>
<p><a href="http://shoogledesigns.com/demos/use_jquery_to_create_an_easy_to_browse_screencast_library.html" target="_blank">http://shoogledesigns.com/demos/use_jquery_to_create_an_easy_to_browse_screencast_library.html</a></p>
<div style="margin-bottom:100px;"></div>
<p><!-- wp_ad_camp_1 --></p>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2010/09/28/collective-use-jquery-to-create-an-easy-to-browse-screencast-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Collective: jQuery.popeye: A Lightbox Alternative</title>
		<link>http://tympanus.net/codrops/2010/07/06/collective-jquery-popeye-a-lightbox-alternative/</link>
		<comments>http://tympanus.net/codrops/2010/07/06/collective-jquery-popeye-a-lightbox-alternative/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 12:35:34 +0000</pubDate>
		<dc:creator>Community</dc:creator>
				<category><![CDATA[Collective]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[lightbox]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=2555</guid>
		<description><![CDATA[jQuery.popeye is an image gallery which is an alternative to the famous Javascript Lightbox, that offers consistent look &#038; feel with the rest of your website. When compared to other Lightbox alternatives, it is more integrated into the flow of the web page. It offers a box with a small preview image with caption, the [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Digg Digg Disabled --></p>
<p><a href="http://www.bloggingdeveloper.com/post/jQuery-popeye-A-Lightbox-Alternative.aspx"><img src="http://tympanus.net/codrops/wp-content/uploads/2010/07/popeye.gif" alt="" title="popeye" width="580" height="519" class="aligncenter size-full wp-image-2563" /></a></p>
<p>jQuery.popeye is an image gallery which is an alternative to the famous Javascript Lightbox, that offers consistent look &#038; feel with the rest of your website. When compared to other Lightbox alternatives, it is more integrated into the flow of the web page. It offers a box with a small preview image with caption, the possibility to flip trough an array of more thumbnails and to show an enlarged version in the same place.</p>
<h3>Source</h3>
<p><a href="http://www.bloggingdeveloper.com/post/jQuery-popeye-A-Lightbox-Alternative.aspx" target="_blank">http://www.bloggingdeveloper.com/post/jQuery-popeye-A-Lightbox-Alternative.aspx</a></p>
<h3>Demo</h3>
<p><a href="http://dev.herr-schuessler.de/jquery/popeye/demo.html" target="_blank">http://dev.herr-schuessler.de/jquery/popeye/demo.html</a></p>
<div style="margin-bottom:100px;"></div>
<p><!-- wp_ad_camp_1 --></p>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2010/07/06/collective-jquery-popeye-a-lightbox-alternative/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sliding Panel Photo Wall Gallery with jQuery</title>
		<link>http://tympanus.net/codrops/2010/05/14/sliding-panel-photo-wall-gallery-with-jquery/</link>
		<comments>http://tympanus.net/codrops/2010/05/14/sliding-panel-photo-wall-gallery-with-jquery/#comments</comments>
		<pubDate>Fri, 14 May 2010 17:42:54 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[slide out]]></category>
		<category><![CDATA[sliding]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=2100</guid>
		<description><![CDATA[View demoDownload source Today we will create a stunning full page photo wall gallery. The idea is to have a whole page full of thumbs with a nice light effect when we hover. When an image is clicked, a panel slides up from the bottom revealing the full picture. When clicking on the full image, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tympanus.net/Tutorials/SlidingPanelPhotowallGallery/" target="_blank"><img class="aligncenter size-full wp-image-2101" title="photowall" src="http://tympanus.net/codrops/wp-content/uploads/2010/05/photowall.jpg" alt="" width="580" height="315" /></a></p>
<p><a class="demo" href="http://tympanus.net/Tutorials/SlidingPanelPhotowallGallery/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/SlidingPanelPhotowallGallery/SlidingPanelPhotowallGallery.zip">Download source</a></p>
<p>Today we will create a stunning full page photo wall gallery. The idea is to have a whole page full of thumbs with a nice light effect when we hover. When an image is clicked, a panel slides up from the bottom revealing the full picture. When clicking on the full image, the thumbs panel slide back from the bottom. This effect will give the impression that we are stacking the panels on top of each other every time we change the mode. In the full picture view we add some nice transition effect when we browse through the photos.</p>
<p>In addition, we will use a function for resizing the full image, adapting it to the size of the screen. So, when the screen get&#8217;s resized, our image will adapt automatically!</p>
<p>The beautiful images in the demo are from <a href="http://www.flickr.com/photos/2dogs_productions/sets/521679/">Vincent Boiteau&#8217;s photostream</a> on Flickr.</p>
<p>This tutorial will be a little bit more complex than usual, so I will give my best to explain things clearly.</p>
<p>Let&#8217;s get started 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 consists of three main containers: one for the info bar at the bottom of the page, one for the thumbnails and one panel container for the full image:</p>
<pre class="brush:xml"> &lt;div class="infobar"&gt;
	&lt;span id="description"&gt;&lt;/span&gt;
	&lt;span id="loading"&gt;Loading Image&lt;/span&gt;
&lt;/div&gt;
&lt;div id="thumbsWrapper"&gt;
	&lt;div id="content" &gt;
		&lt;img src="thumbs/1.JPG" alt="images/1.JPG" title="something"/&gt;
		&lt;img src="thumbs/2.JPG" alt="images/2.JPG" title="something"/&gt;
		...
		&lt;div class="placeholder"&gt;&lt;/div&gt;
	&lt;/div&gt;
&lt;/div&gt;
&lt;div id="panel"&gt;
	&lt;div id="wrapper"&gt;
		&lt;a id="prev"&gt;&lt;/a&gt;
		&lt;a id="next"&gt;&lt;/a&gt;
	&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>The info bar container has a span for the image description and one for the loading display. The thumbnail wrapper contains a content container for all the small images. The very last element after the thumbnails is a placeholder. We need to add some space to the end because we don&#8217;t want the thumbnails to get covered by the info bar. Since we don&#8217;t want to use any paddings or margins in our containers, we simply add another filler element.</p>
<p>The structure for the panel contains a wrapper for the full image and two navigation items. In our JavaScript function we will add the full size image to this wrapper.</p>
<p>Now, let&#8217;s take a look at the style.</p>
<h3>The CSS</h3>
<p>First, we will define some general style for the page:</p>
<pre class="brush:css">*{
    margin:0;
    padding:0;
}
body{
    background-color:#000;
    font-family:Verdana;
    text-transform:uppercase;
    color:#fff;
    font-size:10px;
    overflow:hidden;
}
</pre>
<p>The body needs to get the property overflow hidden, because we will set the scroll bar for the thumbs view only. If we would add scrolling to the page, the scroll bar would appear when the full image panel slides up. We avoid that by saying that the overflow will be hidden for the body.</p>
<p>The info bar will have a fixed position. We always want it to be visible and at the same place in the page:</p>
<pre class="brush:css">.infobar{
    background-color:#000;
    height:28px;
    line-height:28px;
    right:20px;
    position:fixed;
    bottom:0px;
    left:20px;
    z-index:999999999;
    text-align:center;
    color:#ddd;
    -moz-border-radius:10px 10px 0px 0px;
    -webkit-border-top-left-radius:10px;
    -webkit-border-top-right-radius:10px;
    border-top-left-radius:10px;
    border-top-right-radius:10px;
    text-shadow:0px 0px 1px #ccc;
}
</pre>
<p>We add some border radius for rounded borders. We set the z-index crazily high since we want the element to be always on top. of course you could just use a value like 15 or 50. Just be careful with the other elements that will get a new z-index dynamically in the JS. The highest one of them is 10.</p>
<p>The description and the loading item will have the following style:</p>
<pre class="brush:css">span#description{
    text-shadow:1px 1px 1px #000;
    display:none;
}
span#loading{
    display:none;
    padding-right: 30px;
    background:transparent url(../loading.gif) no-repeat center right;
}
</pre>
<p>The loading item will have a loading image as background.</p>
<p>The thumbs wrapper will have a panel like style. We set it fixed, occupying the whole screen. <strong>Important for the effect is the bottom:0px since we will want the wrapper to come up from the bottom by animating its height.</strong> Again, we set the overflow to hidden, since we just want the content container to have a scroll bar.</p>
<pre class="brush:css">#thumbsWrapper{
    overflow:hidden;
    position:fixed;
    height:100%;
    width:100%;
    left:0px;
    right:0px;
    bottom:0px;
}
</pre>
<p>The content wrapper will also occupy all the page. The vertical scroll bar we set explicitly by saying overflow-y:scroll (auto would be the default value). Initially, we want this container to be invisible because we don&#8217;t want to show the scroll bar while there is nothing on the page during the initial loading time.</p>
<pre class="brush:css">#content{
   position:absolute;
   top:0px;
   height:100%;
   width:100%;
   left:0px;
   background-color:#111;
   overflow-y:scroll;
   display:none;
}
</pre>
<p>The images in the content container will float left and have an opacity of 0.4. The hover function will then increase opacity, giving the whole thing a spotlight effect.</p>
<pre class="brush:css">#content img{
    float:left;
    margin:2px;
    cursor:pointer;
    opacity:0.4;
    filter:progid:DXImageTransform.Microsoft.Alpha(opacity=40);
}
</pre>
<p>The placeholder will make sure that our thumbs don&#8217;t get covered by the info bar when we are at the bottom of the page:</p>
<pre class="brush:css">.placeholder{
    float:left;
    clear:both;
    width:100%;
    height:30px;
}
</pre>
<p>The panel will have the following style similar to the style of the thumbs wrapper:</p>
<pre class="brush:css">#panel{
    background-color:#222;
    width:100%;
    position:fixed;
    bottom:0px;
    left:0px;
    right:0px;
    height:0px;
    text-align:center;
}
</pre>
<p>Initially, the</p>
<pre class="brush:css">#panel img{
    cursor:pointer;
    position:relative;
    border:1px solid #000;
    -moz-box-shadow:0px 0px 10px #111;
    -webkit-box-shadow:0px 0px 10px #111;
    box-shadow:0px 0px 10px #111;
    display:none;
}
</pre>
<p>We set it to display:none since we will make it appear by fading it in. This will create a nice effect.</p>
<p>The image wrapper be centered horizontally. This we achieve by setting the left and right margins to auto.</p>
<pre class="brush:css">#wrapper{
    position:relative;
    margin:40px auto 0px auto;
}
</pre>
<p>The navigation items will have the following style:</p>
<pre class="brush:css">a#next,
a#prev{
    width:40px;
    height:40px;
    position:fixed;
    cursor:pointer;
    outline:none;
    display:none;
    background:#aaa url(../nav.png) no-repeat top left;
}
a#next:hover, a#prev:hover{
    background-color:#fff;
}
a#next{
    right:0px;
    top:50%;
    margin-top:-20px;
    background-position: 0px 0px;
}
a#prev{
    left:0px;
    top:50%;
    margin-top:-20px;
    background-position: 0px -40px;
}
</pre>
<p>We give the navigation items a fixed position. <strong>To center an absolute or fixed element horizontally (or vertically) you can give it a top (or left) value of 50% and then a negative top (or left) margin of half of its height (or width). </strong>Since the navigation item is 40px high, our top margin is is -20px.</p>
<p>And that was all the style. Now, let&#8217;s take a look at the JavaScript magic:</p>
<h3>The JavaScript</h3>
<p>OK, don&#8217;t scare, it&#8217;s a bit lengthy&#8230; but don&#8217;t worry, most of it is comments and code indention :)<br />
Our main functions fire when we click on a thumb or click on a full image.</p>
<p>When clicking on a thumbnail (line 34) we first show our loading item in the info bar. Then we say to load the respective image (line 40) with the source being the alt attribute of the thumb we clicked (line 92). Everything that is inside of the load function will just be executed after the image is loaded (line 41 to 93). So, we hide the loading item from the info bar, resize the image to fit into the viewport and append the image element to the wrapper. Then we fade it in (line 54) and slide up the panel where we will see the full image and the fading in effect still executing (57 &#8211; 91). We also show the description and the navigation items, and finally we make the thumbs wrapper disappear by setting the height to 0 (line 90). We do that because we want it sliding back from the bottom when we click on the full image.</p>
<p>For the click event on the full image (line 101 to 119) we need to use &#8220;live&#8221; since the img element is not there in the beginning but it is created dynamically. We animate the thumbs wrapper and set the panel to zero height.</p>
<p>The functions for browsing through the full images check which thumb image is the previous or next one and according to that we set the next or previous full image (line 128 to 137). For that we use the navigate function (line 143 to 191).</p>
<p>From line 18 to 26 we say that we want the full size picture to be resized whenever we resize the window. The resize function is defined from line 197 until 237. We also resize the wrapper around the image.</p>
<pre class="brush:js">$(function() {
	/* this is the index of the last clicked picture */
	var current = -1;
	/* number of pictures */
	var totalpictures = $('#content img').size();
	/* speed to animate the panel and the thumbs wrapper */
	var speed 	= 500;

	/* show the content */
	$('#content').show();

	/*
	when the user resizes the browser window,
	the size of the picture being viewed is recalculated;
	 */
	$(window).bind('resize', function() {
		var $picture = $('#wrapper').find('img');
		resize($picture);
	});

	/*
	when hovering a thumb, animate it's opacity
	for a cool effect;
	when clicking on it, we load the corresponding large image;
	the source of the large image is stored as
	the "alt" attribute of the thumb image
	 */
	$('#content &gt; img').hover(function () {
		var $this   = $(this);
		$this.stop().animate({'opacity':'1.0'},200);
	},function () {
		var $this   = $(this);
		$this.stop().animate({'opacity':'0.4'},200);
	}).bind('click',function(){
		var $this   = $(this);

		/* shows the loading icon */
		$('#loading').show();

		$('<img alt="" />').load(function(){
			$('#loading').hide();
			if($('#wrapper').find('img').length) return;
			current 	= $this.index();
			var $theImage   = $(this);
			/*
			After it's loaded we hide the loading icon
			and resize the image, given the window size;
			then we append the image to the wrapper
			*/
			resize($theImage);

			$('#wrapper').append($theImage);
			/* make its opacity animate */
			$theImage.fadeIn(800);

			/* and finally slide up the panel */
			$('#panel').animate({'height':'100%'},speed,function(){
				/*
				if the picture has a description,
				it's stored in the title attribute of the thumb;
				show it if it's not empty
				 */
				var title = $this.attr('title');
				if(title != '')
					$('#description').html(title).show();
				else
					$('#description').empty().hide();

				/*
				if our picture is the first one,
				don't show the "previous button"
				for the slideshow navigation;
				if our picture is the last one,
				don't show the "next button"
				for the slideshow navigation
				 */
				if(current==0)
					$('#prev').hide();
				else
					$('#prev').fadeIn();
				if(current==parseInt(totalpictures-1))
					$('#next').hide();
				else
					$('#next').fadeIn();
				/*
				we set the z-index and height of the thumbs wrapper
				to 0, because we want to slide it up afterwards,
				when the user clicks the large image
				 */
				$('#thumbsWrapper').css({'z-index':'0','height':'0px'});
			});
		}).attr('src', $this.attr('alt'));
	});

	/*
	when hovering a large image,
	we want to slide up the thumbs wrapper again,
	and reset the panel (like it was initially);
	this includes removing the large image element
	 */
	$('#wrapper &gt; img').live('click',function(){
		$this = $(this);
		$('#description').empty().hide();

		$('#thumbsWrapper').css('z-index','10')
		.stop()
		.animate({'height':'100%'},speed,function(){
			var $theWrapper = $(this);
			$('#panel').css('height','0px');
			$theWrapper.css('z-index','0');
			/*
			remove the large image element
			and the navigation buttons
			 */
			$this.remove();
			$('#prev').hide();
			$('#next').hide();
		});
	});

	/*
	when we are viewing a large image,
	if we navigate to the right/left we need to know
	which image is the corresponding neighbour.
	we know the index of the current picture (current),
	so we can easily get to the neighbour:
	 */
	$('#next').bind('click',function(){
		var $this           = $(this);
		var $nextimage 		= $('#content img:nth-child('+parseInt(current+2)+')');
		navigate($nextimage,'right');
	});
	$('#prev').bind('click',function(){
		var $this           = $(this);
		var $previmage 		= $('#content img:nth-child('+parseInt(current)+')');
		navigate($previmage,'left');
	});

	/*
	given the next or previous image to show,
	and the direction, it loads a new image in the panel.
	 */
	function navigate($nextimage,dir){
		/*
		if we are at the end/beginning
		then there's no next/previous
		 */
		if(dir=='left' &amp;&amp; current==0)
			return;
		if(dir=='right' &amp;&amp; current==parseInt(totalpictures-1))
			return;
		$('#loading').show();
		$('<img alt="" />').load(function(){
			var $theImage = $(this);
			$('#loading').hide();
			$('#description').empty().fadeOut();

			$('#wrapper img').stop().fadeOut(500,function(){
				var $this = $(this);

				$this.remove();
				resize($theImage);

				$('#wrapper').append($theImage.show());
				$theImage.stop().fadeIn(800);

				var title = $nextimage.attr('title');
				if(title != ''){
					$('#description').html(title).show();
				}
				else
					$('#description').empty().hide();

				if(current==0)
					$('#prev').hide();
				else
					$('#prev').show();
				if(current==parseInt(totalpictures-1))
					$('#next').hide();
				else
					$('#next').show();
			});
			/*
			increase or decrease the current variable
			 */
			if(dir=='right')
				++current;
			else if(dir=='left')
				--current;
		}).attr('src', $nextimage.attr('alt'));
	}

	/*
	resizes an image given the window size,
	considering the margin values
	 */
	function resize($image){
		var windowH      = $(window).height()-100;
		var windowW      = $(window).width()-80;
		var theImage     = new Image();
		theImage.src     = $image.attr("src");
		var imgwidth     = theImage.width;
		var imgheight    = theImage.height;

		if((imgwidth &gt; windowW)||(imgheight &gt; windowH)){
			if(imgwidth &gt; imgheight){
				var newwidth = windowW;
				var ratio = imgwidth / windowW;
				var newheight = imgheight / ratio;
				theImage.height = newheight;
				theImage.width= newwidth;
				if(newheight&gt;windowH){
					var newnewheight = windowH;
					var newratio = newheight/windowH;
					var newnewwidth =newwidth/newratio;
					theImage.width = newnewwidth;
					theImage.height= newnewheight;
				}
			}
			else{
				var newheight = windowH;
				var ratio = imgheight / windowH;
				var newwidth = imgwidth / ratio;
				theImage.height = newheight;
				theImage.width= newwidth;
				if(newwidth&gt;windowW){
					var newnewwidth = windowW;
					var newratio = newwidth/windowW;
					var newnewheight =newheight/newratio;
					theImage.height = newnewheight;
					theImage.width= newnewwidth;
				}
			}
		}
		$image.css({'width':theImage.width+'px','height':theImage.height+'px'});
	}
});
</pre>
<p>For further details, check the comments in the code, they describe what is done in the moment.</p>
<p>And that&#8217;s it! I hope you enjoyed the tutorial and the result!</p>
<p><a class="demo" href="http://tympanus.net/Tutorials/SlidingPanelPhotowallGallery/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/Tutorials/SlidingPanelPhotowallGallery/SlidingPanelPhotowallGallery.zip">Download source</a></p>
<div class="googlead"><!-- wp_ad_camp_1 --></div>
<div class="partner_section_post"><span>Message from Testking</span>Learn useful web  design applications with <a href="http://www.testkingsite.com/cisco/CCNA.html">testking ccna</a> course and become expert using <a href="http://www.testkingsite.com/cisco/CCNP.html">testking ccnp</a> design tutorials and <a href="http://www.testkingsite.com/cisco/CCIE.html">testking ccie</a> design recourses.</div>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2010/05/14/sliding-panel-photo-wall-gallery-with-jquery/feed/</wfw:commentRss>
		<slash:comments>117</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  tympanus.net/codrops/tag/image/feed/ ) in 0.27402 seconds, on Feb 7th, 2012 at 12:16 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 7th, 2012 at 1:16 pm UTC -->
