<?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>codr.eu &#187; jQuery</title>
	<atom:link href="http://www.codr.eu/categories/tutorials/javascript/jquery/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codr.eu</link>
	<description>dev screencasts &#38; tutorials</description>
	<lastBuildDate>Mon, 02 Nov 2009 21:41:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating a Javascript Content Slider with jQuery</title>
		<link>http://www.codr.eu/jquery-content-slider</link>
		<comments>http://www.codr.eu/jquery-content-slider#comments</comments>
		<pubDate>Wed, 24 Jun 2009 08:15:24 +0000</pubDate>
		<dc:creator>Paul Chater</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[-moz-box-shadow]]></category>
		<category><![CDATA[-webkit-box-shadow]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[paulchater]]></category>

		<guid isPermaLink="false">http://www.codr.eu/?p=106</guid>
		<description><![CDATA[So, earlier today in the CodrEu Chat Session I was sorting out my project iTask and also showing @PhilSturgeon my jQuery Content Slider on http://pchater.servehttp.com (the default). Anyway, I've been pondering for days on what to do my first Codr Screencast on and this is it!]]></description>
			<content:encoded><![CDATA[<p>So, earlier today in the CodrEu Chat Session I was sorting out my project iTask and also showing @PhilSturgeon my jQuery Content Slider on http://pchater.servehttp.com (the default). Anyway, I&#8217;ve been pondering for days on what to do my first Codr Screencast on and this is it!</p>
<h2>The Video</h2>
<h3>Part One</h3>
<p><object type="application/x-shockwave-flash" data="http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&#038;file=http%3A//blip.tv/rss/flash/2290705&#038;feedurl=http%3A//codreu.blip.tv/rss/&#038;autostart=false&#038;brandname=CodrEu&#038;brandlink=http%3A//codreu.blip.tv/" width="640" height="480" allowfullscreen="true" id="showplayer"><param name="movie" value="http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&#038;file=http%3A//blip.tv/rss/flash/2290705&#038;feedurl=http%3A//codreu.blip.tv/rss/&#038;autostart=false&#038;brandname=CodrEu&#038;brandlink=http%3A//codreu.blip.tv/" /><param name="quality" value="best" /></object></p>
<h3>Part Two</h3>
<p><object type="application/x-shockwave-flash" data="http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&#038;file=http%3A//blip.tv/rss/flash/2290775&#038;feedurl=http%3A//codreu.blip.tv/rss/&#038;autostart=false&#038;brandname=CodrEu&#038;brandlink=http%3A//codreu.blip.tv/" width="640" height="480" allowfullscreen="true" id="showplayer"><param name="movie" value="http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&#038;file=http%3A//blip.tv/rss/flash/2290775&#038;feedurl=http%3A//codreu.blip.tv/rss/&#038;autostart=false&#038;brandname=CodrEu&#038;brandlink=http%3A//codreu.blip.tv/" /><param name="quality" value="best" /></object></p>
<h2>The Code / Explaination</h2>
<h3>index.php &#8211; The Code</h3>
<pre class="brush: html; collapse: true;">
&lt;html>
	&lt;head>
		&lt;title>jQueryness&lt;/title>
<link rel="stylesheet" type="text/css" media="screen, projector" href="style.css">
		<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
		<script type="text/javascript" src="function.js"></script>
</link>

	<body>
<div id="wrapper">
<h1>jQueryness</h1>

			<!-- Start the navigation block -->
			<code>
				<a href="#" id="navItem1">box1</a> |
				<a href="#" id="navItem2">box2</a> |
				<a href="#" id="navItem3">box3</a>
			</code>
			<!-- End the navigation block -->
<div class="box1">
				Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vel massa massa, sit amet laoreet elit. Praesent porttitor pharetra dui,
				quis fringilla justo luctus ac. Duis convallis, dui non facilisis mollis, ipsum diam sodales nisl, vel tincidunt ipsum augue vel lacus.
				Fusce a urna eu lectus mattis placerat. Vestibulum eget urna quis sem rhoncus blandit in vel massa. Nullam in tortor eget sem rhoncus
				consequat vel nec metus. Maecenas vehicula, diam vitae dictum blandit, ante mauris faucibus orci, id ornare erat ligula ac arcu. Nulla
				facilisi. Suspendisse imperdiet feugiat eros, porta lacinia nibh consectetur at. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
				Suspendisse et felis lorem. Praesent vitae nulla risus, eu rhoncus quam.
			</div>
<div class="box2">
				Praesent eget nisl sed sem cursus semper. Donec ut elit a orci feugiat vulputate. Integer posuere sagittis lobortis. Integer pulvinar dictum libero.
				Integer ac velit quam, id dapibus felis. Vestibulum tempor aliquet ligula euismod accumsan. Etiam dapibus ultricies orci, vitae consequat purus venenatis
				vel. Curabitur vestibulum massa ac nisl venenatis posuere. Curabitur dictum metus eget velit congue fermentum. Duis quis quam in urna sollicitudin egestas
				ut vel urna. Suspendisse bibendum sodales pulvinar. Sed a quam nisl, non lacinia erat. Duis pellentesque tincidunt scelerisque. In sed felis at arcu tristique
				semper nec et purus. Ut suscipit semper accumsan. Curabitur tempor sem nec sapien suscipit porta. Donec eget urna nunc, ac bibendum nunc. Quisque congue pellentesque
				arcu nec aliquet. Morbi in mi eget ipsum egestas sagittis.
			</div>
<div class="box3">
				Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vel massa massa, sit amet laoreet elit. Praesent porttitor pharetra dui,
				quis fringilla justo luctus ac. Duis convallis, dui non facilisis mollis, ipsum diam sodales nisl, vel tincidunt ipsum augue vel lacus.
				Fusce a urna eu lectus mattis placerat.
			</div>
</div>

	&lt;/body>
&lt;/html>
</body></pre>
<h3>index.php &#8211; The Explaination</h3>
<p>Okay lets get down to the explaination of index. First we declared the DOCTYPE of </p>
<pre class="brush: html; light: true;">< !DOCTYPE HTML></pre>
<p>we do this so that W3C can validate your page and so that it knows automatically what version of HTML you&#8217;re rusing. This doctype is mainly for HTML5. After that we then opened up our html, head and title tags and inserted the title of jQueryness we then referenced the jquery-1.3.2.min.js from Google Code and our function.js file with </p>
<pre class="brush: html;">
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="function.js"></script>
</pre>
<p>We then closed off our head then opened our body and inserted a new div with the id of wrapper, this is the element which stands out with its CSS3 Specification Drop Shadow</p>
<pre class="brush: html; light:">
<div id="wrapper">
...
</div>
</pre>
<p>after opening the wrapper we decided to put in a heading with our main title in then opened a code tag so that we can link our content boxes with:</p>
<pre class="brush: html;"><code>
<a href="#" id="navItem1">box1</a> |
<a href="#" id="navItem2">box2</a> |
<a href="#" id="navItem3">box3</a>
</code>
</pre>
<p>then finally we created our content boxes with the classes of box1, box2, box3 with the following:</p>
<pre class="brush: html;">
<div class="box1">
...
</div>
<div class="box2">
...
</div>
<div class="box3">
...
</div>
</pre>
<h3>style.css &#8211; The Code &#038; Explaination (in comments)</h3>
<pre class="brush: css; collapse: true;">
/*
 * Define the MAIN background colour, default margin, fonts
 * text colour etcetera.
 */
body {
	background-color: #efefef;
	margin: 40px auto;
	font: 10pt "Lucida Grande", "Trebuchet MS", sans-serif;
	color: #777777;
}

/*
 * Make the wrapper look pretty, center it on the page, make sure
 * that it's no thicker than 500 pixels with some padding, let it have
 * a nice subtle solid dark gray border with a drop shadow
 * 3 pixels from the right, 3 pixels from the bottom and 1 pixel in weight
 * with another subtle gray.
 */
#wrapper {
	margin: 0 auto;
	background-color: #ffffff;
	border: 1px solid #bababa;
	width: 500px;
	padding: 0 15px 10px 15px;
	-moz-box-shadow: 3px 3px 1px #dadada;
	-webkit-box-shadow: 3px 3px 1px #dadada;
}

/*
 * Set a the main font to be a fixed width font such as Monaco
 * with the background of off white, border of dark gray, and font
 * colour of black. Set the margins 14 pixels from the top and bottom
 * Provide a little bit of padding as well so the content looks nice.
 */
code {
	font: 12px Monaco, "Lucida Console", small-fonts;
	background-color: #f9f9f9;
	border: 1px solid #D0D0D0;
	color: #000000;
	display: block;
	margin: 14px 0 14px 0;
	padding: 12px 10px 12px 10px;
}

/*
 * Set the main content boxes display
 * to none so that they're hidden on
 * page load.
 */
.box1, .box2, .box3 {
	display: none;
}</pre>
<h3>function.js &#8211; The Code &#038; Explaination (in comments)</h3>
<pre class="brush: js; collapse: true;">
/*
 * When the document is ready then hide box2 and 3 but show box1.
 */
$(document).ready(function() {
	$("div .box1").show();
	$("div .box2").hide();
	$("div .box3").hide();

/*
 * If the link with the id of navItem is clicked then make
 * relevent box slide down in the duration of 0.6 seconds.
 * Also ensure that the other boxes are hidden.
 */
	$("#navItem1").click(function() {
		$("div .box1").slideDown(600);
		$("div .box2").hide();
		$("div .box3").hide();
	});

	$("#navItem2").click(function() {
		$("div .box2").slideDown(600);
		$("div .box1").hide();
		$("div .box3").hide();
	});

	$("#navItem3").click(function() {
		$("div .box3").slideDown(600);
		$("div .box2").hide();
		$("div .box1").hide();
	});

});</pre>
<h2>The Download</h2>
<div id="download"><a href='http://www.codr.eu/wp-content/uploads/2009/06/jqueryness.zip'><img src="./wp-content/themes/codr/images/download.png" width="128" height="128" border=0 /></a><a href='http://www.codr.eu/wp-content/uploads/2009/06/jqueryness.zip'>jQueryness.zip</a></div>
<h2>Final Words</h2>
<p>Thank you for reading this tutorial and I hope that you find it quite useful, if you have any questions please don&#8217;t hesitate to leave a comment below when the comments get enabled, If they still aren&#8217;t enabled then please email webmaster [ at ] paulchater.co.uk</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codr.eu/jquery-content-slider/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
