<?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>Raymond Selda &#187; jQuery</title>
	<atom:link href="http://www.raymondselda.com/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.raymondselda.com</link>
	<description>Web Designer Turned Internet Marketer</description>
	<lastBuildDate>Wed, 08 Sep 2010 09:55:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Creative Use Of jQuery Cycle In Fancy Curved Layout</title>
		<link>http://www.raymondselda.com/creative-use-of-jquery-cycle-in-fancy-curved-layout/</link>
		<comments>http://www.raymondselda.com/creative-use-of-jquery-cycle-in-fancy-curved-layout/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 16:00:45 +0000</pubDate>
		<dc:creator>Raymond Selda</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.raymondselda.com/?p=1397</guid>
		<description><![CDATA[This article is an effort to answer a layout question posted in CSS-Tricks&#8217; forum. I decided to answer this because it&#8217;s also one of the layouts that I have not been accustomed to converting. Micha posted a link to the layout that needs to be sliced. I checked it out and I really liked it. [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />This article is an effort to answer a <a rel="nofollow" href="http://css-tricks.com/forums/viewtopic.php?f=2&#038;t=3128">layout question</a> posted in CSS-Tricks&#8217; forum. I decided to answer this because it&#8217;s also one of the layouts that I have not been accustomed to converting.</p>
<p>Micha posted a link to the <a rel="nofollow" href="http://www.urbanoarquitectonica.com/plantillas/layout1.jpg">layout</a> that needs to be sliced. I checked it out and I really liked it. I&#8217;m not sure if Micha wanted the image to be animated but I decided to do just that by using the <a rel="nofollow" href="http://malsup.com/jquery/cycle/">jQuery Cycle</a> plugin.</p>
<p>Take a look at the <a href="http://www.raymondselda.com/demo/curve-layout/">final result</a> if you&#8217;re interested.</p>
<p>I didn&#8217;t convert the said layout, instead I created a basic web site design layout in Photoshop with curves similar to the layout.</p>
<p><a href="http://www.raymondselda.com/wp-content/uploads/2009/07/curve-layout.png"><img src="http://www.raymondselda.com/wp-content/uploads/2009/07/curve-layout-300x217.png" alt="Photoshop Layout Design with Fancy Curves" title="Photoshop Layout Design with Fancy Curves" width="300" height="217" class="aligncenter size-medium wp-image-1402" /></a></p>
<p>The main thing that you should plan out is where to slice your layout. This is one of the reasons why I think it&#8217;s important for a web designer to know how to write HTML and CSS. Knowing HTML and CSS basics will help you to design a layout that can be easily sliced and converted to HTML. You can design a layout in Photoshop with a lot of different methods but the difference will show up when it&#8217;s time to slice the design.</p>
<p>Let&#8217;s slice the main background graphic.</p>
<p><a href="http://www.raymondselda.com/wp-content/uploads/2009/07/main-background.png"><img src="http://www.raymondselda.com/wp-content/uploads/2009/07/main-background-300x217.png" alt="Main Background Graphic" title="Main Background Graphic" width="300" height="217" class="aligncenter size-medium wp-image-1404" /></a></p>
<p>Then let&#8217;s slice up the images we need to cycle. I saved them as a .GIF but you can save them in .PNG if you like because we are after the transparency here.</p>
<p><a href="http://www.raymondselda.com/wp-content/uploads/2009/07/sliced-image.gif"><img src="http://www.raymondselda.com/wp-content/uploads/2009/07/sliced-image-300x261.gif" alt="Transparent image to be sliced" title="Transparent image to be sliced" width="300" height="261" class="aligncenter size-medium wp-image-1405" /></a></p>
<p>Now let&#8217;s see how easy it is to convert this into HTML and CSS</p>
<h2>HTML Basic Markup</h2>
<p>We only have the main container which will hold up the images and the content.</p>
<pre class="xhtml" name="code">
&lt;body&gt;
&lt;div id=&quot;container&quot;&gt;
	&lt;div id=&quot;cycle&quot;&gt;
		&lt;img src=&quot;image1.gif&quot; width=&quot;610&quot; height=&quot;522&quot; alt=&quot;description of image here&quot; /&gt;
		&lt;img src=&quot;image2.gif&quot; width=&quot;610&quot; height=&quot;522&quot; alt=&quot;description of image here&quot; /&gt;
		&lt;img src=&quot;image3.gif&quot; width=&quot;610&quot; height=&quot;522&quot; alt=&quot;description of image here&quot; /&gt;
	&lt;/div&gt;
	&lt;div id=&quot;content&quot;&gt;
		&lt;h1&gt;Welcome!&lt;/h1&gt;
		&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam lectus mauris, pretium sed viverra eu, luctus quis risus. Cras convallis euismod eros, eu varius magna condimentum scelerisque. Vivamus eu tellus justo. Nam urna nisl, aliquet vitae sollicitudin ut, feugiat non est.&lt;/p&gt;
		&lt;p&gt;Aliquam blandit tortor lectus. Cras at nisi consequat dolor suscipit venenatis eget ullamcorper eros. Vivamus nec purus nisi. Integer ut lorem risus, ac feugiat sem. Nam et massa enim, quis dictum purus. Proin tortor dui, laoreet at volutpat eu, pharetra elementum risus. &lt;/p&gt;
	&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
</pre>
<h2>CSS Basic Styles</h2>
<p>We apply a relative position to the container so we can absolutely position the images. Then we just float the content to the right and apply proper paddings on the side.</p>
<pre class="css" name="code">
body {
	background:#eee2d2;
	font-size:12px;
	font-family:Arial;
}

p {
	line-height:18px;
}

#container {
	width:960px;
	height:697px;
	background:transparent url(containerbg.png) no-repeat;
	margin:0 auto;
	position:relative;
}

#cycle {
	width:610px;
	height:522px;
	float:left;
	position:absolute;
	top:99px;
}

#content {
	width:310px;
	float:right;
	padding:0 20px;
	position:relative;
	top:240px;
}
</pre>
<h2>Calling and Initializing jQuery Cycle</h2>
<p>Just put this inside the head section and you&#8217;ll be up and running.</p>
<pre class="xhtml" name="code">
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;jquery-cycle-min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
   $(&#39;#cycle&#39;).cycle({
	    fx:    &#39;fade&#39;,
	    speed:  3000
	 });
});
&lt;/script&gt;
</pre>
<h2>Conclusion</h2>
<p>This is basically one quick way to deal with curves and I&#8217;m sure you can come up with a lot more creative and unique layouts. This article also shows how you can get creative with the jQuery Cycle plugin. I hope you get something out of this article and I would love to hear your thoughts. Thanks for checking this out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raymondselda.com/creative-use-of-jquery-cycle-in-fancy-curved-layout/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>jQuery Looped Slider Tutorial</title>
		<link>http://www.raymondselda.com/jquery-looped-slider-tutorial/</link>
		<comments>http://www.raymondselda.com/jquery-looped-slider-tutorial/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 16:00:52 +0000</pubDate>
		<dc:creator>Raymond Selda</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.raymondselda.com/?p=1201</guid>
		<description><![CDATA[Today we&#8217;re going to use Nathan Searles&#8217; jQuery loopedSlider, a plugin made for jQuery that solves a simple problem, the looping of slide content. It was created to be easy to implement, smooth and most of all end the &#8220;content rewind&#8221; that most other content sliders suffer from. This is going to be a quick [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />Today we&#8217;re going to use Nathan Searles&#8217; <a rel="nofollow" href="http://github.com/nathansearles/loopedSlider/tree/master">jQuery loopedSlider</a>, a plugin made for jQuery that solves a simple problem, the looping of slide content. It was created to be easy to implement, smooth and most of all end the &#8220;content rewind&#8221; that most other content sliders suffer from.</p>
<p>This is going to be a quick and easy tutorial. You can just copy and paste the code and have yourself a looping slider in minutes. You can view a <a href="http://raymondselda.com/demo/loopedslider/example1.htm">working demo</a> and feel free to download the complete <a href="http://raymondselda.com/downloads/loopedslider.zip">source files</a>.</p>
<h2>Markup</h2>
<pre class="xhtml" name="code">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
	&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
&lt;head&gt;
	&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;/&gt;

	&lt;title&gt;loopedSlider jQuery Plugin&lt;/title&gt;

	&lt;script src=&quot;http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js&quot; type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
	&lt;script src=&quot;loopedslider.js&quot; type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;

	&lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&gt;	

	&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;div id=&quot;loopedSlider&quot;&gt;
	&lt;div class=&quot;container&quot;&gt;
		&lt;div class=&quot;slides&quot;&gt;
			&lt;div&gt;&lt;img src=&quot;image-01.jpg&quot; width=&quot;600&quot; height=&quot;393&quot; alt=&quot;First Image&quot; /&gt;&lt;/div&gt;
			&lt;div&gt;&lt;img src=&quot;image-02.jpg&quot; width=&quot;600&quot; height=&quot;393&quot; alt=&quot;Second Image&quot; /&gt;&lt;/div&gt;
			&lt;div&gt;&lt;img src=&quot;image-03.jpg&quot; width=&quot;600&quot; height=&quot;393&quot; alt=&quot;Third Image&quot; /&gt;&lt;/div&gt;
			&lt;div&gt;&lt;img src=&quot;image-04.jpg&quot; width=&quot;600&quot; height=&quot;393&quot; alt=&quot;Fourth Image&quot; /&gt;&lt;/div&gt;
		&lt;/div&gt;
	&lt;/div&gt;
	&lt;a href=&quot;#&quot; class=&quot;previous&quot;&gt;previous&lt;/a&gt;
	&lt;a href=&quot;#&quot; class=&quot;next&quot;&gt;next&lt;/a&gt;
	&lt;ul class=&quot;pagination&quot;&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;1&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;2&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;3&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;4&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<h2>Styles (CSS)</h2>
<pre class="css" name="code">
/*
 * Required
*/
.container { width:600px; height:393px; overflow:hidden; position:relative; cursor:pointer; }
.slides { position:absolute; top:0; left:0; }
.slides div { position:absolute; top:0; width:600px; display:none; }
/*
 * Optional
*/
#loopedSlider,#newsSlider { margin:0 auto; width:500px; position:relative; clear:both; }
ul.pagination { list-style:none; padding:0; margin:0; }
ul.pagination li  { float:left; }
ul.pagination li a { padding:2px 4px; }
ul.pagination li.active a { background:blue; color:white; }
</pre>
<h2>Power Up The Slider</h2>
<p>This time we&#8217;re going to initialize the plugin from the bottom section of our document in order to load our content first before the calling our plugin.</p>
<pre class="xhtml" name="code">
&lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;
	$(function(){
		$(&#39;#loopedSlider&#39;).loopedSlider();
	});
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Autostart the slider:</p>
<pre class="xhtml" name="code">
&lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;
	$(function(){
		$(&#39;#loopedSlider&#39;).loopedSlider({
			autoStart: 3000
		});
	});
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Initialize multiple sliders:</p>
<pre class="xhtml" name="code">
&lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;
	$(function(){
		$(&#39;#loopedSlider&#39;).loopedSlider({
			autoStart: 3000
		});
		$(&#39;#anotherSlider&#39;).loopedSlider({
			autoHeight: 400
		});
	});
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><a href="http://raymondselda.com/demo/loopedslider/example3.htm">View Demo for both autostart and multiple sliders</a></p>
<h2>Conclusion</h2>
<p>I really like the simplicity of this plugin and I think I&#8217;m going to use this in my future projects. How about you? Have you ever used jQuery loopedSlider before? What other jQuery sliders would you recommend? Thanks for reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raymondselda.com/jquery-looped-slider-tutorial/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>Create A Tabbed Content Rotator Using jQuery</title>
		<link>http://www.raymondselda.com/create-a-tabbed-content-rotator-using-jquery/</link>
		<comments>http://www.raymondselda.com/create-a-tabbed-content-rotator-using-jquery/#comments</comments>
		<pubDate>Wed, 06 May 2009 17:04:08 +0000</pubDate>
		<dc:creator>Raymond Selda</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.raymondselda.com/?p=958</guid>
		<description><![CDATA[Today we are going to create a tabbed content rotator (not sure what to call it really) using everyone&#8217;s favorite Javascript framework, jQuery and an interface library called jQuery UI. This effect can be used effectively on your homepage to present customers with your products and services. jQuery UI 1.6 &#8211; The User Interface Library [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p><span class="dropcaps">T</span>oday we are going to create a tabbed content rotator (not sure what to call it really) using everyone&#8217;s favorite Javascript framework, <a href="http://jquery.com/">jQuery</a> and an interface library called <a href="http://jqueryui.com/home">jQuery UI</a>. This effect can be used effectively on your homepage to present customers with your products and services.</p>
<p><span id="more-958"></span></p>
<div class="promotion-block">
<a rel="nofollow" href="http://www.packtpub.com/user-interface-library-for-jquery/book/mid/0906098ia3mh"><img src="http://www.raymondselda.com/wp-content/uploads/2009/05/jqueryui16book.jpg" alt="jQuery UI 1.6 Book" title="jQuery UI 1.6 Book" width="152" height="188" class="alignleft size-full wp-image-1281" /></a></p>
<h2>jQuery UI 1.6 &#8211; The User Interface Library for jQuery</h2>
<p>Javascript is not really my cup of tea that&#8217;s why I use jQuery, a framework for easily interacting with Javascript. jQuery UI is a library built on top of jQuery which allows you to create interactions, full-featured widgets and animation effects.  <a rel="nofollow" href="http://www.packtpub.com/user-interface-library-for-jquery/book/mid/0906098ia3mh">jQuery UI 1.6: The User Interface Library for jQuery</a>, written by Dan Wellman, is a book that will give you a good foundation in learning jQuery UI.</p>
<p><a rel="nofollow" href="http://www.packtpub.com/user-interface-library-for-jquery/book/mid/0906098ia3mh">jQuery UI 1.6: The User Interface Library for jQuery</a> has in-depth explanations on each component; building from its default basic state into a more advanced state. Additionally, the book also looks at how components can be used in real world scenarios. This book is aimed at user interface designers and developers who need to learn how to implement jQuery UI quickly.
</div>
<p>I also have a tutorial on <a href="http://www.raymondselda.com/professional-dark-css-menu/">coding up a professional menu</a> in case rotating content with tabs is not your thing. You can view a <a href="http://www.raymondselda.com/demo/tabbed-rotator/">working demo</a> of this tutorial in case you&#8217;re curious and feel free to download the <a href="http://www.raymondselda.com/downloads/tabbed-rotator.zip">source files</a> for reference.</p>
<p>Let us begin.</p>
<h2>Build A Solid Structure &#8211; XHTML</h2>
<p>We have our usual wrapper that wraps the rotator div which contains the tabs structured as a list and the content fragments that we&#8217;re going to rotate. We also reference jQuery and jQuery UI in the head section. The key point here are the class names <strong>ui-tabs-selected</strong> and <strong>ui-tabs-hide</strong> for the list and content fragments. Those class names are part responsible for rotating our content.</p>
<p><strong>Updated</strong>: We just called <code>ui.core.js</code> and <code>ui.tabs.js</code> instead of using a customized code. Please check out the updates. Hope most of you will be able to use this one. Thanks.</p>
<pre class="xhtml" name="code">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
        &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;

&lt;head&gt;
&lt;title&gt;Tabbed Content Rotator Using JQuery&lt;/title&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html;charset=utf-8&quot; /&gt;
&lt;meta http-equiv=&quot;Content-Style-Type&quot; content=&quot;text/css&quot; /&gt;

&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;ui.core.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;ui.tabs.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;

&lt;body&gt;
&lt;div id=&quot;wrapper&quot;&gt;
	&lt;div id=&quot;rotator&quot;&gt;
		&lt;!-- Tabs --&gt;
	    &lt;ul class=&quot;ui-tabs-nav&quot;&gt;
	        &lt;li class=&quot;ui-tabs-nav-item ui-tabs-selected&quot; id=&quot;nav-fragment-1&quot;&gt;&lt;a href=&quot;#fragment-1&quot;&gt;&lt;span&gt;Maximize Profits&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	        &lt;li class=&quot;ui-tabs-nav-item&quot; id=&quot;nav-fragment-2&quot;&gt;&lt;a href=&quot;#fragment-2&quot;&gt;&lt;span&gt;Flexible Technology&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	        &lt;li class=&quot;ui-tabs-nav-item&quot; id=&quot;nav-fragment-3&quot;&gt;&lt;a href=&quot;#fragment-3&quot;&gt;&lt;span&gt;Practical Solutions&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	        &lt;li class=&quot;ui-tabs-nav-item&quot; id=&quot;nav-fragment-4&quot;&gt;&lt;a href=&quot;#fragment-4&quot;&gt;&lt;span&gt;Customer Support&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	    &lt;/ul&gt;

	    &lt;!-- First Content --&gt;
	    &lt;div id=&quot;fragment-1&quot; class=&quot;ui-tabs-panel&quot; style=&quot;&quot;&gt;
	        &lt;h2&gt;Maximize Profits&lt;/h2&gt;
	        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla tincidunt condimentum lacus. Pellentesque ut diam.&lt;/p&gt;
	        &lt;p&gt;&lt;a class=&quot;btn_get_started&quot; href=&quot;#&quot;&gt;Get Started&lt;/a&gt; &lt;a class=&quot;btn_learn_more&quot; href=&quot;#&quot;&gt;Learn More&lt;/a&gt;&lt;/p&gt;
	    &lt;/div&gt;

	    &lt;!-- Second Content --&gt;
	    &lt;div id=&quot;fragment-2&quot; class=&quot;ui-tabs-panel ui-tabs-hide&quot; style=&quot;&quot;&gt;
	        &lt;h2&gt;Flexible Technology&lt;/h2&gt;
	        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla tincidunt condimentum lacus. Pellentesque ut diam.&lt;/p&gt;
	        &lt;p&gt;&lt;a class=&quot;btn_get_started&quot; href=&quot;#&quot;&gt;Get Started&lt;/a&gt; &lt;a class=&quot;btn_learn_more&quot; href=&quot;#&quot;&gt;Learn More&lt;/a&gt;&lt;/p&gt;
	    &lt;/div&gt;

	    &lt;!-- Third Content --&gt;
	    &lt;div id=&quot;fragment-3&quot; class=&quot;ui-tabs-panel ui-tabs-hide&quot; style=&quot;&quot;&gt;
	        &lt;h2&gt;Practical Solutions&lt;/h2&gt;
	        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla tincidunt condimentum lacus. Pellentesque ut diam.&lt;/p&gt;
	        &lt;p&gt;&lt;a class=&quot;btn_get_started&quot; href=&quot;#&quot;&gt;Get Started&lt;/a&gt; &lt;a class=&quot;btn_learn_more&quot; href=&quot;#&quot;&gt;Learn More&lt;/a&gt;&lt;/p&gt;
	    &lt;/div&gt;

	    &lt;!-- Fourth Content --&gt;
	    &lt;div id=&quot;fragment-4&quot; class=&quot;ui-tabs-panel ui-tabs-hide&quot; style=&quot;&quot;&gt;
	        &lt;h2&gt;Customer Support&lt;/h2&gt;
	        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla tincidunt condimentum lacus. Pellentesque ut diam.&lt;/p&gt;
	        &lt;p&gt;&lt;a class=&quot;btn_get_started&quot; href=&quot;#&quot;&gt;Get Started&lt;/a&gt; &lt;a class=&quot;btn_learn_more&quot; href=&quot;#&quot;&gt;Learn More&lt;/a&gt;&lt;/p&gt;
	    &lt;/div&gt;
	&lt;/div&gt;&lt;!-- end rotator --&gt;
&lt;/div&gt;&lt;!-- end wrapper --&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<h2>Wrapper and Rotator Styles</h2>
<p>After establishing our structure, we now design our rotator with some CSS. Assign a width and a couple of borders to our wrapper then center it. We then make some room for the tabs by adding a bottom padding to our rotator div. </p>
<pre class="css" name="code">
/* Rotator Styles */
#wrapper {
	width:960px;
	border-top:3px solid #92a5bc;
	border-bottom:1px solid #92a5bc;
	margin:0 auto;
}

#rotator {
	background:#FFF;
	color:#000;
	position:relative;
	padding-bottom:2.6em;
	margin:0;
	font-size:16px;
}
</pre>
<h2>Tab Styles</h2>
<p>Basically we position the tabs below the content fragments and we display them horizontally. You&#8217;re also going to notice that we stacked up a few selectors (the list and the elements inside it) because each of them will share the same properties and values and we always strive to write optimized CSS.</p>
<pre class="css" name="code">
/* Tabs */
ul.ui-tabs-nav, li.ui-tabs-nav-item, li.ui-tabs-nav-item a:link, li.ui-tabs-nav-item a:visited {
	margin:0;
	padding:0;
	border:0;
	outline:0;
	line-height:1.3;
	text-decoration:none;
	font-size:100%;
	list-style:none;
	float:left;
	font-family:Arial, Helvetica, sans-serif;
}

ul.ui-tabs-nav {
	position:absolute;
	bottom:0px;
	left:0;
	z-index:1;
	width:100%;
	background:#FFF url(images/uitabsbg.gif) repeat-x bottom right;
	border-top:1px solid #FFF;
}
</pre>
<h2>Non-Selected Tab Styles</h2>
<p>Assign our tabs some font and border styles. We also tile the same background image from the <strong>ul.ui-tabs-nav</strong></p>
<pre class="css" name="code">
/* Non-Selected Tabs */
li.ui-tabs-nav-item a:link,
li.ui-tabs-nav-item a:visited {
	font-size:.8em;
	font-weight:normal;
	color:#999;
	background:#FFF url(images/uitabsbg.gif) repeat-x bottom left;
	border-left:1px solid #FFF;
	border-right:1px solid #c5ced9;
}
</pre>
<h2>Hovered Tab Styles</h2>
<p>We give our tabs some padding and give the hover state a background graphic.</p>
<pre class="css" name="code">
/* Hovered Tab */
#rotator .ui-tabs-nav-item a:hover,
#rotator .ui-tabs-nav-item a:active {
	background:#FFF url(images/uiactivetabbg.gif) repeat-x bottom left;
	color:#333;
}

#rotator .ui-tabs-nav-item a span {
	float:left;
	padding:1em;
	cursor:pointer;
}
</pre>
<h2>Active Tab Styles</h2>
<p>We give all of the link states the same hover background graphic. Basically you can customize this graphic according to your design needs.</p>
<pre class="css" name="code">
/* Active Tab */
#rotator .ui-tabs-selected a:link,
#rotator .ui-tabs-selected a:visited,
#rotator .ui-tabs-selected a:hover,
#rotator .ui-tabs-selected a:active {
	background:#fff url(images/uiactivetabbg.gif) repeat-x bottom left;
	color:#333;
}
</pre>
<h2>Content Panel Styles</h2>
<p>Now we&#8217;re going to style the content panel. This is the section that holds the content that is being rotated. The key point here is the padding which we&#8217;re going to use to enclose the text content and make some room for the background graphic associated with each rotated content. Then we use a class to  hide the other panels.</p>
<pre class="css" name="code">
/* Content Panels */
#rotator .ui-tabs-panel {
	font-family:Arial, Helvetica, sans-serif;
	clear:left;
	color:#000;
	padding:40px 540px 15px 15px;
	height:225px;
}

#rotator .ui-tabs-hide {
	display:none;
}
</pre>
<h2>Content Styles</h2>
<p>We&#8217;re just going to style our header, paragraph and links inside the content panel.</p>
<pre class="css" name="code">
#rotator h2 {
	color:#E75D00;
	font-weight:normal;
	margin:0;
	font-size:1.8em;
	line-height:1.2em;
}

#rotator p {
	font-size:1.1em;
	margin:.5em 0;
	color:#333;
}

#rotator .btn_get_started {
	float:left;
	height:30px;
	width:99px;
	text-indent:-9999em;
	margin-right:7px;
	overflow:hidden;
	background:transparent url(images/getstarted.gif) no-repeat
}

#rotator .btn_learn_more {
	float:left;
	height:26px;
	font-size:.9em;
}
</pre>
<h2>Background Images</h2>
<p>Now we&#8217;re going to apply the background images. The first 2 panels have the images to the right part of the panel so we need to position the graphic to the right. Then we&#8217;re going to position the images to the left for the other 2 panels. Also take note that we need to set a new padding to make some room for the images that are positioned to the left. And that&#8217;s it for the CSS.</p>
<pre class="css" name="code">
/* Background Images */
#rotator #fragment-1 {
	background:transparent url(images/coins.jpg) no-repeat top right;
}

#rotator #fragment-2 {
	background:transparent url(images/bearings.jpg) no-repeat top right;
}

#rotator #fragment-3 {
	background:transparent url(images/map.jpg) no-repeat top left;
	padding:40px 15px 15px 540px;
}

#rotator #fragment-4 {
	background:transparent url(images/support.jpg) no-repeat top left;
	padding:40px 15px 15px 540px;
}
</pre>
<h2>Making the Contents Rotate</h2>
<p>Now it&#8217;s time for some jQuery magic! If you&#8217;ll notice at the beginning when we first built our structure, we referenced two Javascript files in the head section. First reference is for jQuery and the second is for jQuery UI.</p>
<p>To make our content rotate we just need to invoke the <a href="http://jqueryui.com/demos/tabs/#method-rotate">function to rotate our tabs</a> that is included in jQuery UI library. You just need to point the tabs function to the section where it holds the links, in this case we enter <strong>#rotator > ul</strong> inside our function.</p>
<pre class="javascript" name="code">
&lt;script type=&quot;text/javascript&quot;&gt;
	$(document).ready(function(){
		$(&quot;#rotator&quot;).tabs({fx:{opacity: &quot;toggle&quot;}}).tabs(&quot;rotate&quot;, 4000);
	});
&lt;/script&gt;
</pre>
<h2>Voila! We are Done!</h2>
<p>Content rotators are one of the neat ways you can showcase your products and services without taking up too much screen real estate. After you&#8217;re finished, you can experiment and try placing the tabs above or lining them up vertically. Try looking up some websites that use this kind of interface for inspiration. Simple variations to the interface can be a great way to learn more about CSS.</p>
<p>I hope you will find this tutorial helpful. If you have any questions or comments please feel free to let me know. Until then, see you next week and have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raymondselda.com/create-a-tabbed-content-rotator-using-jquery/feed/</wfw:commentRss>
		<slash:comments>129</slash:comments>
		</item>
	</channel>
</rss>
