<?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>monofolio</title>
	<atom:link href="http://www.monofolio.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.monofolio.com</link>
	<description>All problems have solutions</description>
	<lastBuildDate>Fri, 25 Jun 2010 07:56:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jQuery : ตอนที่ 1 jQuery Tab</title>
		<link>http://www.monofolio.com/jquery-%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b5%e0%b9%88-1-jquery-tab/</link>
		<comments>http://www.monofolio.com/jquery-%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b5%e0%b9%88-1-jquery-tab/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 09:49:54 +0000</pubDate>
		<dc:creator>Jax</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[featured]]></category>

		<guid isPermaLink="false">http://www.monofolio.com/?p=9</guid>
		<description><![CDATA[เรามาประเดิมบทความแรกกันด้วย jQuery ง่ายๆกันดีกว่าครับ เอาเป็น tab ก็แล้วกัน เป็นอะไรที่ใช้บ่อยเหมือนกันอย่างงานของผมนี่ก็มีแทบทุกเว็บ บางคนอาจจะเคยลองใช้เป็น jQuery plugin ซึ่งมันก็สะดวกดีนะ แบบว่าประกาศปุ๊บก็ใช้ได้เลย แต่บางทีมันก็ไม่ตรงกับที่อยากจะได้ ด้วยเหตุผลที่กล่าวมา เรามาเขียน tab ใช้เองกันดีกว่า ซึ่งก็ไม่ได้ยุ่งยากอะไรเท่าไหร่เขียน jQuery บรรทัดเดียวเอง ก็ได้ tab มาใช้แล้ว ถ้าคิดว่าผมขี้โม้ก็คลิ๊กเข้ามาดูเลย 555+]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.monofolio.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/9.jpg&amp;w=200&amp;h=150&amp;zc=1&amp;ft=jpg' alt='post thumbnail' /></p>
<h3>JAVASCRIPT</h3>
<pre class="brush: java;">
&lt;script language=&quot;javascript&quot;&gt;
$(function(){
	$(&quot;.tab ul li&quot;).click(function(){
		$(this).addClass(&quot;active&quot;).siblings().removeClass(&quot;active&quot;).end().parent() .parent().find(&quot;div &gt; div:eq(&quot; + $(this).parent().find('li').index($(this)) + &quot;)&quot;).show().siblings().hide();
//อาจจะยาวไปนิด แต่บรรทัดเดียวนะตัวเธอว์
	});
});
&lt;/script&gt;
</pre>
<h3>CSS</h3>
<pre class="brush: css;">
.tab{
width:400px;
margin:50px auto;
}

.tab div div{
display:none;
border-top:2px solid #AD1342;
padding:10px; height:200px;
background:#FFF;
}

.tab ul li{
display:inline
cursor:pointer;
background:#CCC;
color:#333;
padding:2px 10px;
float:left;
margin:0 2px 0 0;
}

.tab ul li.active{
background:#AD1342;
color:#FFF;
}
</pre>
<h3>HTML MARK UP</h3>
<pre class="brush: xml;">
&lt;div class=&quot;tab&quot;&gt;
    &lt;ul&gt;
        &lt;li class=&quot;active&quot;&gt;tab-1&lt;/li&gt;
        &lt;li&gt;tab-2&lt;/li&gt;
        &lt;li&gt;tab-3&lt;/li&gt;
        &lt;li&gt;tab-4&lt;/li&gt;
        &lt;li&gt;tab-5&lt;/li&gt;
    &lt;/ul&gt;
    &lt;div&gt;
        &lt;div style=&quot;display:block;&quot;&gt;content-1&lt;/div&gt;
        &lt;div&gt;content-2&lt;/div&gt;
        &lt;div&gt;content-3&lt;/div&gt;
        &lt;div&gt;content-4&lt;/div&gt;
        &lt;div&gt;content-5&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</pre>
<h3>DEMO</h3>
<div class="iframe-wrapper">
  <iframe src="http://www.monofolio.com/wp-content/uploads/demo-tab.html" frameborder="0" style="height:500px;width:600px;">Please upgrade your browser</iframe>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.monofolio.com/jquery-%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b5%e0%b9%88-1-jquery-tab/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
