<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>RRPowered</title>
	
	<link>http://www.rrpowered.com</link>
	<description />
	<lastBuildDate>Sun, 07 Oct 2012 02:38:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/rrpowereds" /><feedburner:info uri="rrpowereds" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>rrpowereds</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/rrpowereds" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Frrpowereds" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item>
		<title>PHP Div Columns</title>
		<link>http://feedproxy.google.com/~r/rrpowereds/~3/7-IKw4Sw6zM/</link>
		<comments>http://www.rrpowered.com/2012/05/php-div-columns/#comments</comments>
		<pubDate>Thu, 24 May 2012 04:02:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Colums]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.rrpowered.com/?p=574</guid>
		<description><![CDATA[Display records 5 columns wide using Div’s. &#160; lets get started. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 &#8230; <a href="http://www.rrpowered.com/2012/05/php-div-columns/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>Display records 5 columns wide using Div’s.</h5>
<p><a href="http://www.rrpowered.com/2012/05/php-div-columns/" class="image-post"><img src="http://www.rrpowered.com/images/columns.png" alt="" class="post-img" /></a><br />
<span id="more-574"></span><br />
&nbsp;<br />
<b>lets get started.</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
</pre>
<pre><span class="php"><span class="php-script-tag">&lt;?</span>PHP
<span class="php-comment">/*Created by Barrett at RRPowered.com*/</span>
<span class="php-keyword">include</span> <span class="php-brackets">(</span><span class="php-string">'connection.php'</span><span class="php-brackets">)</span>;
<span class="php-comment">//Connection to database
</span>
<span class="php-var">$columns</span> <span class="php-operator">=</span> <span class="php-string">&quot;5&quot;</span>;
<span class="php-comment">//How many columns to display
</span>
<span class="php-var">$r</span> <span class="php-operator">=</span> <span class="php-number">0</span>;
<span class="php-comment">//Set r to 0
</span>
<span class="php-var">$get_draft</span> <span class="php-operator">=</span> <span class="php-function">mysql_query</span><span class="php-brackets">(</span><span class="php-string">&quot;SELECT * FROM your_table&quot;</span><span class="php-brackets">)</span><span class="php-operator"> or </span><span class="php-function">die</span><span class="php-brackets">(</span><span class="php-function">mysql_error</span><span class="php-brackets">(</span><span class="php-brackets">)</span><span class="php-brackets">)</span>;
<span class="php-keyword">while</span> <span class="php-brackets">(</span><span class="php-var">$rows</span> <span class="php-operator">=</span> <span class="php-function">mysql_fetch_array</span><span class="php-brackets">(</span><span class="php-var">$get_draft</span><span class="php-brackets">)</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
	<span class="php-var">$your_table</span> <span class="php-operator">=</span> <span class="php-var">$rows</span><span class="php-brackets">[</span><span class="php-string">'your_table'</span><span class="php-brackets">]</span>;

	<span class="php-var">$r</span><span class="php-operator">+</span><span class="php-operator">+</span>;
	<span class="php-comment">//Add 1 to r
</span>

	<span class="php-var">$row</span> <span class="php-operator">.</span><span class="php-operator">=</span> <span class="php-string">'&lt;div class=&quot;row&quot;&gt;'</span> <span class="php-operator">.</span> <span class="php-var">$your_table</span> <span class="php-operator">.</span> <span class="php-string">'&lt;/div&gt;'</span>;

	<span class="php-comment">//Clear div every $columns
</span>
	<span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-var">$r</span> <span class="php-operator">=</span><span class="php-operator">=</span> <span class="php-var">$columns</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
		<span class="php-var">$row</span> <span class="php-operator">.</span><span class="php-operator">=</span> <span class="php-string">'&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;'</span>;
		<span class="php-comment">//Or you can use &lt;br /&gt;
</span>
		<span class="php-var">$r</span> <span class="php-operator">=</span> <span class="php-number">0</span>;
		<span class="php-comment">//Set r to 0
</span>
	<span class="php-brackets">}</span>
<span class="php-brackets">}</span>
<span class="php-script-tag">?&gt;<span class="html"></span></span></span></pre>
</div>
<p>Here is the whole code. </p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
</pre>
<pre><span class="html"><span class="html-other-element">&lt;?PHP
/*Created by Barrett at RRPowered.com*/
include (<span class="html-attribute">'connection.php'</span>);
//Connection to database
$columns = <span class="html-attribute">&quot;5&quot;</span>;
//How many columns to display
$r = 0;
//Set r to 0
$get_draft = mysql_query(<span class="html-attribute">&quot;SELECT * FROM your_table&quot;</span>) or die(mysql_error());
while ($rows = mysql_fetch_array($get_draft)) {
	$your_table = $rows[<span class="html-attribute">'your_table'</span>];

	$r++;
	//Add 1 to r

	$row .= <span class="html-attribute">'&lt;div class=&quot;row&quot;</span>&gt;</span>' . $your_table . '<span class="html-other-element">&lt;/div&gt;</span>';

	//Clear div every $columns
	if ($r == $columns) {
		$row .= '<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;clear&quot;</span>&gt;</span><span class="html-other-element">&lt;/div&gt;</span>';
		//Or you can use <span class="html-other-element">&lt;br /&gt;</span>
		$r = 0;
		//Set r to 0
	}
}
?&gt;
<span class="html-other-element">&lt;html&gt;</span>
	<span class="html-other-element">&lt;head&gt;</span>
		<span class="html-other-element">&lt;title&gt;</span>5 column wide records<span class="html-other-element">&lt;/title&gt;</span>
		<span class="html-style-element">&lt;style type=<span class="css-string">&quot;text/css&quot;</span>&gt;<span class="css"><span class="css">
			body {
				<span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 400px</span></span>;
				<span class="css-property">font-family<span class="css-selector">:</span><span class="css-value"> arial</span></span>;
			}

			.row {
				<span class="css-property">border<span class="css-selector">:</span><span class="css-value"> solid #606060 1px</span></span>;
				<span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 5px</span></span>;
				<span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
				<span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 50px</span></span>;
				<span class="css-property">float<span class="css-selector">:</span><span class="css-value"> left</span></span>;
			}

			.<span class="css-property">clear {
				clear<span class="css-selector">:</span><span class="css-value"> both</span></span>;
			}

		</span></span>&lt;/style&gt;</span>
	<span class="html-other-element">&lt;/head&gt;</span>
	<span class="html-other-element">&lt;body&gt;</span>
		<span class="html-other-element">&lt;h1&gt;</span>PHP 5 column wide records<span class="html-other-element">&lt;/h1&gt;</span>
		<span class="html-other-element">&lt;?PHP echo $row; ?&gt;</span>
	<span class="html-other-element">&lt;/body&gt;</span>
<span class="html-other-element">&lt;/html&gt;</span></span></pre>
</div>
<img src="http://feeds.feedburner.com/~r/rrpowereds/~4/7-IKw4Sw6zM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.rrpowered.com/2012/05/php-div-columns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.rrpowered.com/2012/05/php-div-columns/</feedburner:origLink></item>
		<item>
		<title>Create a Basic Website using Div’s</title>
		<link>http://feedproxy.google.com/~r/rrpowereds/~3/yc_JQ7dA_4M/</link>
		<comments>http://www.rrpowered.com/2012/05/create-a-basic-website-using-divs/#comments</comments>
		<pubDate>Sun, 20 May 2012 01:34:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Basic]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Div's]]></category>
		<category><![CDATA[Valid]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[Xhtml]]></category>

		<guid isPermaLink="false">http://www.rrpowered.com/?p=566</guid>
		<description><![CDATA[We are gonna create a website from scratch using valid XHTML and CSS. Instead of using old fashion Tables We use Div’s. &#160; Demo The HTML 1 2 3 4 5 6 7 8 9 10 11 12 13 14 &#8230; <a href="http://www.rrpowered.com/2012/05/create-a-basic-website-using-divs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>We are gonna create a website from scratch using valid XHTML and CSS. Instead of using old fashion Tables We use Div’s.</h5>
<p><a href="http://www.rrpowered.com/2012/05/create-a-basic-website-using-divs/" class="image-post"><img src="http://www.rrpowered.com/images/layout.png" alt="" class="post-img" /></a><br />
<span id="more-566"></span><br />
&nbsp;<br />
<a href="http://www.rrpowered.com/demo/basicweb/" alt="img" class="demo">Demo</a><br />
<b>The HTML</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
</pre>
<pre><span class="html"><span class="html-other-element">&lt;!DOCTYPE html PUBLIC <span class="html-attribute">&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span>
<span class="html-attribute">&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;</span>&gt;</span>
<span class="html-other-element">&lt;html xmlns=<span class="html-attribute">&quot;http://www.w3.org/1999/xhtml&quot;</span> xml:lang=<span class="html-attribute">&quot;en&quot;</span> lang=<span class="html-attribute">&quot;en&quot;</span>&gt;</span>
<span class="html-other-element">&lt;head&gt;</span>
    <span class="html-other-element">&lt;title&gt;</span>RRPowered Themes<span class="html-other-element">&lt;/title&gt;</span>
    <span class="html-other-element">&lt;meta http-equiv=<span class="html-attribute">&quot;Content-Type&quot;</span> content=<span class="html-attribute">&quot;text/html;charset=utf-8&quot;</span>/&gt;</span>	
	<span class="html-other-element">&lt;link rel=<span class="html-attribute">&quot;stylesheet&quot;</span> type=<span class="html-attribute">&quot;text/css&quot;</span> href=<span class="html-attribute">&quot;styles.css&quot;</span>/&gt;</span>
<span class="html-other-element">&lt;/head&gt;</span>
<span class="html-other-element">&lt;body&gt;</span>
<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;container&quot;</span>&gt;</span>
The Container Div
	 <span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;header&quot;</span>&gt;</span>
	The Header Div
	<span class="html-other-element">&lt;/div&gt;</span>
	<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;content&quot;</span>&gt;</span>
	The Content Div
	 <span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;sidebar&quot;</span>&gt;</span>
	The Sidebar Div
	<span class="html-other-element">&lt;/div&gt;</span>
	<span class="html-other-element">&lt;/div&gt;</span>
	<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;footer&quot;</span>&gt;</span>
	The Footer Div
	<span class="html-other-element">&lt;/div&gt;</span>
<span class="html-other-element">&lt;/div&gt;</span>
<span class="html-other-element">&lt;/body&gt;</span>
<span class="html-other-element">&lt;/html&gt;</span></span></pre>
</div>
<p><b>Now for the CSS</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
</pre>
<pre><span class="css">body {
    <span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 0</span></span>; 
    <span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 0</span></span>;
    <span class="css-property">font-family<span class="css-selector">:</span><span class="css-value"> <span class="css-string">&quot;arial&quot;</span></span></span>;
    <span class="css-property">font-size<span class="css-selector">:</span><span class="css-value"> 18px</span></span>;
    <span class="css-property">font-weight<span class="css-selector">:</span><span class="css-value"> bold</span></span>;
    }
.container {
    <span class="css-property">height<span class="css-selector">:</span><span class="css-value"> 100%</span></span>;
    <span class="css-property">border<span class="css-selector">:</span><span class="css-value"> solid #000000 2px</span></span>;
    }	
 
.header {
    <span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 650px</span></span>;
    <span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 0 auto</span></span>;
    <span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 20px</span></span>;
    <span class="css-property">border<span class="css-selector">:</span><span class="css-value"> solid red 2px</span></span>;
    }
 
.<span class="css-property">content {
    width<span class="css-selector">:</span><span class="css-value"> 650px</span></span>;
 
    <span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 0 auto</span></span>;
    <span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 20px</span></span>;
    <span class="css-property">border<span class="css-selector">:</span><span class="css-value"> solid blue 2px</span></span>;
    }
 
.sidebar {
    <span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
 
    <span class="css-property">border<span class="css-selector">:</span><span class="css-value"> solid yellow 2px</span></span>;
    <span class="css-property">float<span class="css-selector">:</span><span class="css-value"> right</span></span>;
    }	
 
.footer {
    <span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 650px</span></span>;
    <span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 0 auto</span></span>;
    <span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 20px</span></span>;
    <span class="css-property">border<span class="css-selector">:</span><span class="css-value"> solid green 2px</span></span>;
    }</span></pre>
</div>
<img src="http://feeds.feedburner.com/~r/rrpowereds/~4/yc_JQ7dA_4M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.rrpowered.com/2012/05/create-a-basic-website-using-divs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.rrpowered.com/2012/05/create-a-basic-website-using-divs/</feedburner:origLink></item>
		<item>
		<title>Awesome jQuery Animated WebSite</title>
		<link>http://feedproxy.google.com/~r/rrpowereds/~3/D4w1_wD0sHQ/</link>
		<comments>http://www.rrpowered.com/2012/03/awesome-jquery-animated-website/#comments</comments>
		<pubDate>Sun, 25 Mar 2012 00:56:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Animated]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://www.rrpowered.com/?p=544</guid>
		<description><![CDATA[In this tutorial, I’m gonna show you how to make an awesome jQuery animated website. &#160; Demo The jQuery 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 &#8230; <a href="http://www.rrpowered.com/2012/03/awesome-jquery-animated-website/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>In this tutorial, I’m gonna show you how to make an awesome jQuery animated website.</h5>
<p><a href="http://www.rrpowered.com/2012/03/awesome-jquery-animated-website/" class="image-post"><img src="http://www.rrpowered.com/images/magic.png" alt="" class="post-img" /></a><br />
<span id="more-544"></span><br />
&nbsp;<br />
<a href="http://www.rrpowered.com/demo/animatedsite" alt="img" class="demo">Demo</a><br />
<b>The jQuery</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre>
<pre><span class="js">$<span class="js-bracket">(</span><span class="js-client-keyword">document</span><span class="js-bracket">)</span>.ready<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
    $<span class="js-bracket">(</span><span class="js-string">&quot;.nav_bar li&quot;</span><span class="js-bracket">)</span>.<span class="js-client-keyword">click</span><span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
    <span class="js-comment">/*Get the class from the menu button that was clicked*/</span>
	<span class="js-reserved-keyword">var</span> Tab <span class="js-operator">=</span> $<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.attr<span class="js-bracket">(</span><span class="js-string">&quot;class&quot;</span><span class="js-bracket">)</span>;
        <span class="js-comment">/*Slide the current DIV to the right 1500px*/</span>
	    $<span class="js-bracket">(</span><span class="js-string">&quot;.box&quot;</span><span class="js-bracket">)</span>.<span class="js-client-keyword">stop</span><span class="js-bracket">(</span><span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>
	        left <span class="js-operator">:</span> <span class="js-string">&quot;1500px&quot;</span>
		<span class="js-bracket">}</span>, <span class="js-number">1</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-number">0</span>, <span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
                    <span class="js-comment">/*Now set the current DIV opacity to 0 and left 1500px then hide it*/</span>
		    $<span class="js-bracket">(</span><span class="js-string">&quot;.box&quot;</span><span class="js-bracket">)</span>.css<span class="js-bracket">(</span><span class="js-string">&quot;left&quot;</span>, <span class="js-string">&quot;-1500px&quot;</span><span class="js-bracket">)</span>.hide<span class="js-bracket">(</span><span class="js-bracket">)</span>;
                    <span class="js-comment">/*Show the new div slide right to 0px, set opacity to 100% then stop the animation*/</span>
		        $<span class="js-bracket">(</span><span class="js-string">&quot;#&quot;</span> <span class="js-operator">+</span> Tab<span class="js-bracket">)</span>.show<span class="js-bracket">(</span><span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>
			    left <span class="js-operator">:</span> <span class="js-string">&quot;0px&quot;</span>,
			    opacity <span class="js-operator">:</span> <span class="js-number">1</span>.<span class="js-number">0</span>
			<span class="js-bracket">}</span>, <span class="js-number">1</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-bracket">)</span>.<span class="js-client-keyword">stop</span><span class="js-bracket">(</span><span class="js-bracket">)</span>;
	   <span class="js-bracket">}</span><span class="js-bracket">)</span>;
    <span class="js-bracket">}</span><span class="js-bracket">)</span>;
<span class="js-bracket">}</span><span class="js-bracket">)</span>;</span></pre>
</div>
<p><b>Now for the HTML</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
</pre>
<pre><span class="html"><span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;outer&quot;</span>&gt;</span>
    <span class="html-comment">&lt;!--Here is the nav bar --&gt;</span>
    <span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;nav_bar&quot;</span>&gt;</span>
        <span class="html-comment">&lt;!--Inside our nav bar we have a list to display all of our pages --&gt;</span>
        <span class="html-other-element">&lt;ul&gt;</span>
	    <span class="html-other-element">&lt;li class=<span class="html-attribute">&quot;p1&quot;</span>&gt;</span>
	    Home
	    <span class="html-other-element">&lt;/li&gt;</span>
	    <span class="html-other-element">&lt;li class=<span class="html-attribute">&quot;p2&quot;</span>&gt;</span>
	    Page 1
	    <span class="html-other-element">&lt;/li&gt;</span>
	    <span class="html-other-element">&lt;li class=<span class="html-attribute">&quot;p3&quot;</span>&gt;</span>
	    Page 2
	    <span class="html-other-element">&lt;/li&gt;</span>
	    <span class="html-other-element">&lt;li class=<span class="html-attribute">&quot;p4&quot;</span>&gt;</span>
	    Page 3
	    <span class="html-other-element">&lt;/li&gt;</span>
	<span class="html-other-element">&lt;/ul&gt;</span>
    <span class="html-other-element">&lt;/div&gt;</span>
    <span class="html-comment">&lt;!-- Now for the page content --&gt;</span>
    <span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;container&quot;</span>&gt;</span>
        <span class="html-comment">&lt;!-- We have a div for every page --&gt;</span>
        <span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;box&quot;</span>&gt;</span><span class="html-other-element">&lt;/div&gt;</span>
	<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;box&quot;</span> id=<span class="html-attribute">&quot;p1&quot;</span>&gt;</span>
	    <span class="html-other-element">&lt;h3&gt;</span>Home<span class="html-other-element">&lt;/h3&gt;</span>
	<span class="html-other-element">&lt;/div&gt;</span>
	<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;box&quot;</span> id=<span class="html-attribute">&quot;p2&quot;</span>&gt;</span>
	    <span class="html-other-element">&lt;h3&gt;</span>Page 1<span class="html-other-element">&lt;/h3&gt;</span>
	<span class="html-other-element">&lt;/div&gt;</span>
	<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;box&quot;</span> id=<span class="html-attribute">&quot;p3&quot;</span>&gt;</span>
	    <span class="html-other-element">&lt;h3&gt;</span>Page 2<span class="html-other-element">&lt;/h3&gt;</span>
	<span class="html-other-element">&lt;/div&gt;</span>
	<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;box&quot;</span> id=<span class="html-attribute">&quot;p4&quot;</span>&gt;</span>
	    <span class="html-other-element">&lt;h3&gt;</span>Page 3<span class="html-other-element">&lt;/h3&gt;</span>
	<span class="html-other-element">&lt;/div&gt;</span>
    <span class="html-other-element">&lt;/div&gt;</span>
<span class="html-other-element">&lt;/div&gt;</span></span></pre>
</div>
<p><b>Now put the whole thing together!</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
</pre>
<pre><span class="html"><span class="html-comment">&lt;!-- Created by Barrett at RRPowered.com --&gt;</span>
<span class="html-other-element">&lt;!DOCTYPE html PUBLIC <span class="html-attribute">&quot;-//W3C//DTD XHTML 1.1//EN&quot;</span>
<span class="html-attribute">&quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;</span>&gt;</span>
<span class="html-other-element">&lt;html&gt;</span>
	<span class="html-other-element">&lt;head&gt;</span>
		<span class="html-script-element">&lt;script type=<span class="html-attribute">&quot;text/javascript&quot;</span> src=<span class="html-attribute">&quot;http://ajax.googleapis.com/
		ajax/libs/jquery/1.7.1/jquery.min.js&quot;</span>&gt;<span class="js"><span class="js"></span></span>&lt;/script&gt;</span>
		<span class="html-other-element">&lt;link rel=<span class="html-attribute">&quot;stylesheet&quot;</span> type=<span class="html-attribute">&quot;text/css&quot;</span> href=<span class="html-attribute">&quot;styles.css&quot;</span> /&gt;</span>
		<span class="html-other-element">&lt;title&gt;</span>Awesome Animated Website<span class="html-other-element">&lt;/title&gt;</span>
		<span class="html-script-element">&lt;script type=<span class="html-attribute">&quot;text/javascript&quot;</span>&gt;<span class="js"><span class="js">
			$<span class="js-bracket">(</span><span class="js-client-keyword">document</span><span class="js-bracket">)</span>.ready<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
				$<span class="js-bracket">(</span><span class="js-string">&quot;.nav_bar li&quot;</span><span class="js-bracket">)</span>.<span class="js-client-keyword">click</span><span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>

					<span class="js-comment">/*Get the class from the menu button that was clicked*/</span>
					<span class="js-reserved-keyword">var</span> Tab <span class="js-operator">=</span> $<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.attr<span class="js-bracket">(</span><span class="js-string">&quot;class&quot;</span><span class="js-bracket">)</span>;

					<span class="js-comment">/*Slide the current DIV to the right 1500px*/</span>
					$<span class="js-bracket">(</span><span class="js-string">&quot;.box&quot;</span><span class="js-bracket">)</span>.<span class="js-client-keyword">stop</span><span class="js-bracket">(</span><span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>
						left <span class="js-operator">:</span> <span class="js-string">&quot;1500px&quot;</span>
					<span class="js-bracket">}</span>, <span class="js-number">1</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-number">0</span>, <span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>

						<span class="js-comment">/*Now set the current DIV opacity to 0 and left 1500px then hide it*/</span>
						$<span class="js-bracket">(</span><span class="js-string">&quot;.box&quot;</span><span class="js-bracket">)</span>.css<span class="js-bracket">(</span><span class="js-string">&quot;left&quot;</span>, <span class="js-string">&quot;-1500px&quot;</span><span class="js-bracket">)</span>.hide<span class="js-bracket">(</span><span class="js-bracket">)</span>;

						<span class="js-comment">/*Show the new div slide right to 0px, set opacity to 100% then stop the animation*/</span>
						$<span class="js-bracket">(</span><span class="js-string">&quot;#&quot;</span> <span class="js-operator">+</span> Tab<span class="js-bracket">)</span>.show<span class="js-bracket">(</span><span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>
							left <span class="js-operator">:</span> <span class="js-string">&quot;0px&quot;</span>,
							opacity <span class="js-operator">:</span> <span class="js-number">1</span>.<span class="js-number">0</span>
						<span class="js-bracket">}</span>, <span class="js-number">1</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-bracket">)</span>.<span class="js-client-keyword">stop</span><span class="js-bracket">(</span><span class="js-bracket">)</span>;
					<span class="js-bracket">}</span><span class="js-bracket">)</span>;
				<span class="js-bracket">}</span><span class="js-bracket">)</span>;
			<span class="js-bracket">}</span><span class="js-bracket">)</span>;
		</span></span>&lt;/script&gt;</span>
	<span class="html-other-element">&lt;/head&gt;</span>
	<span class="html-other-element">&lt;body&gt;</span>
		<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;outer&quot;</span>&gt;</span>
			<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;nav_bar&quot;</span>&gt;</span>
				<span class="html-other-element">&lt;ul&gt;</span>
					<span class="html-other-element">&lt;li class=<span class="html-attribute">&quot;p1&quot;</span>&gt;</span>
						Home
					<span class="html-other-element">&lt;/li&gt;</span>
					<span class="html-other-element">&lt;li class=<span class="html-attribute">&quot;p2&quot;</span>&gt;</span>
						Page 1
					<span class="html-other-element">&lt;/li&gt;</span>
					<span class="html-other-element">&lt;li class=<span class="html-attribute">&quot;p3&quot;</span>&gt;</span>
						Page 2
					<span class="html-other-element">&lt;/li&gt;</span>
					<span class="html-other-element">&lt;li class=<span class="html-attribute">&quot;p4&quot;</span>&gt;</span>
						Page 3
					<span class="html-other-element">&lt;/li&gt;</span>
				<span class="html-other-element">&lt;/ul&gt;</span>
			<span class="html-other-element">&lt;/div&gt;</span>
			<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;container&quot;</span>&gt;</span>
				<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;box&quot;</span>&gt;</span><span class="html-other-element">&lt;/div&gt;</span>
				<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;box&quot;</span> id=<span class="html-attribute">&quot;p1&quot;</span>&gt;</span>
					<span class="html-other-element">&lt;h3&gt;</span>Home<span class="html-other-element">&lt;/h3&gt;</span>
				<span class="html-other-element">&lt;/div&gt;</span>
				<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;box&quot;</span> id=<span class="html-attribute">&quot;p2&quot;</span>&gt;</span>
					<span class="html-other-element">&lt;h3&gt;</span>Page 1<span class="html-other-element">&lt;/h3&gt;</span>
				<span class="html-other-element">&lt;/div&gt;</span>
				<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;box&quot;</span> id=<span class="html-attribute">&quot;p3&quot;</span>&gt;</span>
					<span class="html-other-element">&lt;h3&gt;</span>Page 2<span class="html-other-element">&lt;/h3&gt;</span>
				<span class="html-other-element">&lt;/div&gt;</span>
				<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;box&quot;</span> id=<span class="html-attribute">&quot;p4&quot;</span>&gt;</span>
					<span class="html-other-element">&lt;h3&gt;</span>Page 3<span class="html-other-element">&lt;/h3&gt;</span>
				<span class="html-other-element">&lt;/div&gt;</span>
			<span class="html-other-element">&lt;/div&gt;</span>
		<span class="html-other-element">&lt;/div&gt;</span>
	<span class="html-other-element">&lt;/body&gt;</span>
<span class="html-other-element">&lt;/html&gt;</span></span></pre>
</div>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
</pre>
<pre><span class="css"><span class="css-comment">/*Created by Barrett at RRPowered.com*/</span>
.outer {
   <span class="css-property">padding 0</span>;
   <span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 0</span></span>;
   }   
 
.nav_bar {
   <span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 850px</span></span>;
   <span class="css-property">margin-top<span class="css-selector">:</span><span class="css-value"> 60px</span></span>;
   <span class="css-property">margin-left<span class="css-selector">:</span><span class="css-value"> auto</span></span>;
   <span class="css-property">margin-right<span class="css-selector">:</span><span class="css-value"> auto</span></span>;
   <span class="css-property">background-color<span class="css-selector">:</span><span class="css-value"> #f5f5f5</span></span>;
   <span class="css-property">border<span class="css-selector">:</span><span class="css-value"> solid #bfbfbf 2px</span></span>;
   <span class="css-property">-moz-border-radius<span class="css-selector">:</span><span class="css-value"> 8px</span></span>;
   <span class="css-property">border-radius<span class="css-selector">:</span><span class="css-value"> 8px</span></span>;
   <span class="css-property">overflow<span class="css-selector">:</span><span class="css-value"> hidden</span></span>;
   }
 
.nav_bar ul {
   <span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 0</span></span>;
   <span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 0</span></span>;
   <span class="css-property">list-style<span class="css-selector">:</span><span class="css-value"> none</span></span>;
   }
 
.nav_bar li {
   <span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 6px 8px 6px 8px</span></span>;
   <span class="css-property">border-right<span class="css-selector">:</span><span class="css-value"> solid #bfbfbf 2px</span></span>;
   <span class="css-property">cursor<span class="css-selector">:</span><span class="css-value"> pointer</span></span>;
   <span class="css-property">font-weight<span class="css-selector">:</span><span class="css-value"> bold</span></span>;
   <span class="css-property">display<span class="css-selector">:</span><span class="css-value"> inline</span></span>;
   <span class="css-property">float<span class="css-selector">:</span><span class="css-value">left</span></span>;
   }   
 
.nav_bar li:hover {
   <span class="css-property">background-color<span class="css-selector">:</span><span class="css-value"> #e2e2e2</span></span>;
   } 
 
.box {
   <span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
   <span class="css-property">background-color<span class="css-selector">:</span><span class="css-value"> #f5f5f5</span></span>;
   <span class="css-property">border<span class="css-selector">:</span><span class="css-value"> solid #bfbfbf 2px</span></span>;
   <span class="css-property">-moz-border-radius<span class="css-selector">:</span><span class="css-value"> 8px</span></span>;
   <span class="css-property">border-radius<span class="css-selector">:</span><span class="css-value"> 8px</span></span>;   
   }   
 
.box {
   <span class="css-property">display<span class="css-selector">:</span><span class="css-value"> none</span></span>;
   <span class="css-property">position<span class="css-selector">:</span><span class="css-value"> relative</span></span>;
   } 
 
.container {
   <span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 850px</span></span>;
   <span class="css-property">margin-top<span class="css-selector">:</span><span class="css-value"> 30px</span></span>;
   <span class="css-property">margin-left<span class="css-selector">:</span><span class="css-value"> auto</span></span>;
   <span class="css-property">margin-right<span class="css-selector">:</span><span class="css-value"> auto</span></span>;   
   <span class="css-property">overflow<span class="css-selector">:</span><span class="css-value">hidden</span></span>;
   } 
 
 #p1 {
   <span class="css-property">display<span class="css-selector">:</span><span class="css-value"> block</span></span>;
   }</span></pre>
</div>
<img src="http://feeds.feedburner.com/~r/rrpowereds/~4/D4w1_wD0sHQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.rrpowered.com/2012/03/awesome-jquery-animated-website/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.rrpowered.com/2012/03/awesome-jquery-animated-website/</feedburner:origLink></item>
		<item>
		<title>Use jQuery to load external files</title>
		<link>http://feedproxy.google.com/~r/rrpowereds/~3/YZAQHeK-X-Y/</link>
		<comments>http://www.rrpowered.com/2012/02/use-jquery-to-load-external-files/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 04:05:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Load External File]]></category>

		<guid isPermaLink="false">http://www.rrpowered.com/?p=534</guid>
		<description><![CDATA[I’m going to show you an easy way to load a external file using jQuery and use a loading image while file loads. &#160; Demo lets go!!!. We are gonna use the jQuery .load() function to load are external page. &#8230; <a href="http://www.rrpowered.com/2012/02/use-jquery-to-load-external-files/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>I’m going to show you an easy way to load a external file using jQuery and use a loading image while file loads.</h5>
<p><a href="http://www.rrpowered.com/2012/02/use-jquery-to-load-external-files/" class="image-post"><img src="http://www.rrpowered.com/images/ex.gif" alt="" class="post-img" /></a><br />
<span id="more-534"></span><br />
&nbsp;<br />
<a href="http://www.rrpowered.com/demo/loadex" alt="img" class="demo">Demo</a><br />
<b>lets go!!!.</b><br />
We are gonna use the jQuery <b>.load()</b> function to load are external page.<br />
The code below will load the <b>external.html</b> file into a div with the class of <b>.loaded_files</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
</pre>
<pre><span class="html">$(&quot;.loaded_files&quot;).load('external.html');</span></pre>
</div>
<p><b>We&#8217;re all done!</b><br />
Now that we know how it works, let&#8217;s put it all together.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
</pre>
<pre><span class="html"><span class="html-comment">&lt;!-- Created by Barrett at RRPowered.com --&gt;</span>
<span class="html-comment">&lt;!-- File name index.html --&gt;</span>
<span class="html-other-element">&lt;!DOCTYPE html PUBLIC <span class="html-attribute">&quot;-//W3C//DTD XHTML 1.1//EN&quot;</span>
<span class="html-attribute">&quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;</span>&gt;</span>
<span class="html-other-element">&lt;html&gt;</span>
	<span class="html-other-element">&lt;head&gt;</span>
		<span class="html-script-element">&lt;script type=<span class="html-attribute">&quot;text/javascript&quot;</span> src=<span class="html-attribute">&quot;http://ajax.googleapis.com/ajax/
		libs/jquery/1.7.1/jquery.min.js&quot;</span>&gt;<span class="js"><span class="js"></span></span>&lt;/script&gt;</span>
		<span class="html-other-element">&lt;title&gt;</span>Load external files with jQuery Demo<span class="html-other-element">&lt;/title&gt;</span>
		<span class="html-style-element">&lt;style type=<span class="css-string">&quot;text/css&quot;</span>&gt;<span class="css"><span class="css">
			.load_files {
				<span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 5px</span></span>;
				<span class="css-property">font-weight<span class="css-selector">:</span><span class="css-value"> bold</span></span>;
				<span class="css-property">background-color<span class="css-selector">:</span><span class="css-value"> #A9F5A9</span></span>;
				<span class="css-property">border<span class="css-selector">:</span><span class="css-value"> solid #333333 1px</span></span>;
				<span class="css-property">cursor<span class="css-selector">:</span><span class="css-value"> pointer</span></span>;
			}
			<span class="css-comment">/* The loading image */</span>
			.loading {
				<span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 20px</span></span>;
				<span class="css-property">height<span class="css-selector">:</span><span class="css-value"> 20px</span></span>;
				<span class="css-property">background-image<span class="css-selector">:</span><span class="css-value"> url(<span class="css-string">'loader.gif'</span>)</span></span>;
				<span class="css-property">display<span class="css-selector">:</span><span class="css-value"> none</span></span>;
			}

		</span></span>&lt;/style&gt;</span>
		<span class="html-script-element">&lt;script type=<span class="html-attribute">&quot;text/javascript&quot;</span>&gt;<span class="js"><span class="js">
			$<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
				$<span class="js-bracket">(</span><span class="js-string">&quot;.load_files&quot;</span><span class="js-bracket">)</span>.<span class="js-client-keyword">click</span><span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
					$<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.hide<span class="js-bracket">(</span><span class="js-bracket">)</span>;
					<span class="js-comment">/* When load files button is clicked hide it */</span>
					$<span class="js-bracket">(</span><span class="js-string">&quot;.loading&quot;</span><span class="js-bracket">)</span>.show<span class="js-bracket">(</span><span class="js-bracket">)</span>;
					<span class="js-comment">/* Show loading image */</span>
					<span class="js-comment">/* Load the external file */</span>
					$<span class="js-bracket">(</span><span class="js-string">&quot;.loaded_files&quot;</span><span class="js-bracket">)</span>.<span class="js-client-keyword">load</span><span class="js-bracket">(</span><span class="js-string">'external.html'</span>, <span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
						$<span class="js-bracket">(</span><span class="js-string">&quot;.loading&quot;</span><span class="js-bracket">)</span>.hide<span class="js-bracket">(</span><span class="js-bracket">)</span>;
						<span class="js-comment">/* Hide loading image when external file is loaded */</span>
					<span class="js-bracket">}</span><span class="js-bracket">)</span>;
				<span class="js-bracket">}</span><span class="js-bracket">)</span>;
			<span class="js-bracket">}</span><span class="js-bracket">)</span>;

		</span></span>&lt;/script&gt;</span>
	<span class="html-other-element">&lt;/head&gt;</span>
	<span class="html-other-element">&lt;body&gt;</span>
		<span class="html-other-element">&lt;h2&gt;</span>Load external files with jQuery<span class="html-other-element">&lt;/h2&gt;</span>
		<span class="html-form-element">&lt;button class=<span class="html-attribute">&quot;load_files&quot;</span>&gt;</span>
			Load Files
		<span class="html-form-element">&lt;/button&gt;</span>
		<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;loading&quot;</span>&gt;</span><span class="html-other-element">&lt;/div&gt;</span>
		<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;loaded_files&quot;</span>&gt;</span><span class="html-other-element">&lt;/div&gt;</span>
	<span class="html-other-element">&lt;/body&gt;</span>
<span class="html-other-element">&lt;/html&gt;</span></span></pre>
</div>
<p><b>Now for the external file.</b><br />
external.html</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
</pre>
<pre><span class="html"><span class="html-other-element">&lt;p&gt;</span>External File Loaded With jQuery<span class="html-other-element">&lt;/p&gt;</span></span></pre>
</div>
<img src="http://feeds.feedburner.com/~r/rrpowereds/~4/YZAQHeK-X-Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.rrpowered.com/2012/02/use-jquery-to-load-external-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.rrpowered.com/2012/02/use-jquery-to-load-external-files/</feedburner:origLink></item>
		<item>
		<title>jQuery simple image slide</title>
		<link>http://feedproxy.google.com/~r/rrpowereds/~3/g4VXjGW_8zU/</link>
		<comments>http://www.rrpowered.com/2012/02/jquery-simple-image-slide/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 03:48:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Image Slide]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.rrpowered.com/?p=514</guid>
		<description><![CDATA[A simple jQuery image slide for use on you website or blog. &#160; Demo lets get started. Here is the javascript. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 &#8230; <a href="http://www.rrpowered.com/2012/02/jquery-simple-image-slide/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>A simple jQuery image slide for use on you website or blog.</h5>
<p><a href="http://www.rrpowered.com/2012/02/jquery-simple-image-slide/" class="image-post"><img src="http://www.rrpowered.com/images/imageslide.gif" alt="" class="post-img" /></a><br />
<span id="more-514"></span><br />
&nbsp;<br />
<a href="http://www.rrpowered.com/demo/imageslide" alt="img" class="demo">Demo</a><br />
<b>lets get started.</b><br />
Here is the javascript. </p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
</pre>
<pre><span class="js">$<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
    	<span class="js-native-keyword">setInterval</span><span class="js-bracket">(</span><span class="js-string">&quot;slide()&quot;</span>, <span class="js-number">5</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-bracket">)</span>;
    	<span class="js-comment">//Time is in milliseconds 5000ms is equivalent to 5sec
</span>
    <span class="js-bracket">}</span><span class="js-bracket">)</span>;
    <span class="js-comment">//Call the slide function
</span>
    <span class="js-function-keyword">function</span> slide<span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
    
    	<span class="js-reserved-keyword">var</span> act <span class="js-operator">=</span> $<span class="js-bracket">(</span><span class="js-string">&quot;#slide img.active&quot;</span><span class="js-bracket">)</span>;
    	<span class="js-comment">//Get the current active image
</span>
    
    	<span class="js-reserved-keyword">var</span> img_src <span class="js-operator">=</span> $<span class="js-bracket">(</span><span class="js-string">&quot;#slide img.active&quot;</span><span class="js-bracket">)</span>.attr<span class="js-bracket">(</span><span class="js-string">&quot;src&quot;</span><span class="js-bracket">)</span>;
    	<span class="js-comment">//Get the image path
</span>
    
    	<span class="js-reserved-keyword">if</span><span class="js-bracket">(</span>act.length <span class="js-operator">=</span><span class="js-operator">=</span> <span class="js-number">0</span><span class="js-bracket">)</span>
    		act <span class="js-operator">=</span> $<span class="js-bracket">(</span><span class="js-string">'#slide img:last'</span><span class="js-bracket">)</span>;
    	<span class="js-comment">//If active equals 0 set act to last img
</span>
    
    	<span class="js-reserved-keyword">var</span> nex <span class="js-operator">=</span> act.next<span class="js-bracket">(</span><span class="js-bracket">)</span>.length <span class="js-operator">?</span> act.next<span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-operator">:</span> $<span class="js-bracket">(</span><span class="js-string">'#slide img:first'</span><span class="js-bracket">)</span>;
    	<span class="js-comment">/*If next active
    	 image equals 0 go to first image  if not go to next image */</span>
    
    	nex.addClass<span class="js-bracket">(</span><span class="js-string">'active'</span><span class="js-bracket">)</span>;
    	<span class="js-comment">//Set the class active to image
</span>
    
    	$<span class="js-bracket">(</span><span class="js-string">&quot;.append_image&quot;</span><span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>
    		opacity <span class="js-operator">:</span> <span class="js-number">0</span>.<span class="js-number">0</span><span class="js-number">5</span>
    	<span class="js-bracket">}</span>, <span class="js-number">1</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-number">0</span>, <span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span><span class="js-comment">//Fade old image out
</span>
    		$<span class="js-bracket">(</span><span class="js-string">&quot;.append_image&quot;</span><span class="js-bracket">)</span>.attr<span class="js-bracket">(</span><span class="js-string">&quot;src&quot;</span>, <span class="js-string">&quot;&quot;</span> <span class="js-operator">+</span> img_src<span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>
    			opacity <span class="js-operator">:</span> <span class="js-number">1</span>.<span class="js-number">0</span>
    		<span class="js-bracket">}</span>, <span class="js-number">1</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-number">0</span>, <span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span><span class="js-comment">//Fade new image in
</span>
    			act.removeClass<span class="js-bracket">(</span><span class="js-string">'active last-active'</span><span class="js-bracket">)</span>;
    			<span class="js-comment">//Remove classes &quot;active&quot; and &quot;last-active&quot;
</span>
    		<span class="js-bracket">}</span><span class="js-bracket">)</span>;
    	<span class="js-bracket">}</span><span class="js-bracket">)</span>;
    <span class="js-bracket">}</span></span></pre>
</div>
<p><b>The HTML</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre>
<pre><span class="html"><span class="html-other-element">&lt;div id=<span class="html-attribute">&quot;frame&quot;</span>&gt;</span>
	<span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;imaged.png&quot;</span> alt=<span class="html-attribute">&quot;d&quot;</span> class=<span class="html-attribute">&quot;append_image&quot;</span>&gt;</span>
<span class="html-other-element">&lt;/div&gt;</span>
<span class="html-other-element">&lt;div id=<span class="html-attribute">&quot;slide&quot;</span>&gt;</span>
	<span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;imagea.png&quot;</span> alt=<span class="html-attribute">&quot;a&quot;</span> class=<span class="html-attribute">&quot;active&quot;</span>&gt;</span>
	<span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;imageb.png&quot;</span> alt=<span class="html-attribute">&quot;b&quot;</span>&gt;</span>
	<span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;imagec.png&quot;</span> alt=<span class="html-attribute">&quot;c&quot;</span>&gt;</span>
	<span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;imaged.png&quot;</span> alt=<span class="html-attribute">&quot;d&quot;</span>&gt;</span>
<span class="html-other-element">&lt;/div&gt;</span></span></pre>
</div>
<p><b>Now put the whole code together!</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
</pre>
<pre><span class="html"><span class="html-comment">&lt;!-- Created by Barrett at RRPowered.com --&gt;</span>
<span class="html-comment">&lt;!-- File name index.html --&gt;</span>
<span class="html-other-element">&lt;!DOCTYPE html PUBLIC <span class="html-attribute">&quot;-//W3C//DTD XHTML 1.1//EN&quot;</span>
<span class="html-attribute">&quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;</span>&gt;</span>
<span class="html-other-element">&lt;html&gt;</span>
	<span class="html-other-element">&lt;head&gt;</span>
		<span class="html-script-element">&lt;script type=<span class="html-attribute">&quot;text/javascript&quot;</span> src=<span class="html-attribute">&quot;http://ajax.googleapis.com/ajax/
		libs/jquery/1.7.1/jquery.min.js&quot;</span>&gt;<span class="js"><span class="js"></span></span>&lt;/script&gt;</span>
		<span class="html-other-element">&lt;title&gt;</span>A simple jQuery image slide<span class="html-other-element">&lt;/title&gt;</span>
		<span class="html-style-element">&lt;style type=<span class="css-string">&quot;text/css&quot;</span>&gt;<span class="css"><span class="css">
			body {
				<span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 200px 0 0 400px</span></span>;
				<span class="css-property">font-family<span class="css-selector">:</span><span class="css-value"> <span class="css-string">&quot;arial&quot;</span></span></span>;
			}
			#slide {
				<span class="css-property">display<span class="css-selector">:</span><span class="css-value"> none</span></span>;
			}
			#frame {
				<span class="css-property">height<span class="css-selector">:</span><span class="css-value"> 104px</span></span>;
				<span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 420px</span></span>;
				<span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
				<span class="css-property">border<span class="css-selector">:</span><span class="css-value"> solid #808080 2px</span></span>;
			}
		</span></span>&lt;/style&gt;</span>
		<span class="html-script-element">&lt;script type=<span class="html-attribute">&quot;text/javascript&quot;</span>&gt;<span class="js"><span class="js">
			$<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
				<span class="js-native-keyword">setInterval</span><span class="js-bracket">(</span><span class="js-string">&quot;slide()&quot;</span>, <span class="js-number">5</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-bracket">)</span>;
				<span class="js-comment">//Time is in milliseconds 5000ms is equivalent to 5sec
</span>
			<span class="js-bracket">}</span><span class="js-bracket">)</span>;
			<span class="js-comment">//Call the slide function
</span>
			<span class="js-function-keyword">function</span> slide<span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>

				<span class="js-reserved-keyword">var</span> act <span class="js-operator">=</span> $<span class="js-bracket">(</span><span class="js-string">&quot;#slide img.active&quot;</span><span class="js-bracket">)</span>;
				<span class="js-comment">//Get the current active image
</span>

				<span class="js-reserved-keyword">var</span> img_src <span class="js-operator">=</span> $<span class="js-bracket">(</span><span class="js-string">&quot;#slide img.active&quot;</span><span class="js-bracket">)</span>.attr<span class="js-bracket">(</span><span class="js-string">&quot;src&quot;</span><span class="js-bracket">)</span>;
				<span class="js-comment">//Get the image path
</span>

				<span class="js-reserved-keyword">if</span><span class="js-bracket">(</span>act.length <span class="js-operator">=</span><span class="js-operator">=</span> <span class="js-number">0</span><span class="js-bracket">)</span>
					act <span class="js-operator">=</span> $<span class="js-bracket">(</span><span class="js-string">'#slide img:last'</span><span class="js-bracket">)</span>;
				<span class="js-comment">//If active equals 0 set act to last img
</span>

				<span class="js-reserved-keyword">var</span> nex <span class="js-operator">=</span> act.next<span class="js-bracket">(</span><span class="js-bracket">)</span>.length <span class="js-operator">?</span> act.next<span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-operator">:</span> $<span class="js-bracket">(</span><span class="js-string">'#slide img:first'</span><span class="js-bracket">)</span>;
				<span class="js-comment">/*If next active
				 image equals 0 go to first image  if not go to next image */</span>

				nex.addClass<span class="js-bracket">(</span><span class="js-string">'active'</span><span class="js-bracket">)</span>;
				<span class="js-comment">//Set the class active to image
</span>

				$<span class="js-bracket">(</span><span class="js-string">&quot;.append_image&quot;</span><span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>
					opacity <span class="js-operator">:</span> <span class="js-number">0</span>.<span class="js-number">0</span><span class="js-number">5</span>
				<span class="js-bracket">}</span>, <span class="js-number">1</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-number">0</span>, <span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span><span class="js-comment">//Fade old image out
</span>
					$<span class="js-bracket">(</span><span class="js-string">&quot;.append_image&quot;</span><span class="js-bracket">)</span>.attr<span class="js-bracket">(</span><span class="js-string">&quot;src&quot;</span>, <span class="js-string">&quot;&quot;</span> <span class="js-operator">+</span> img_src<span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>
						opacity <span class="js-operator">:</span> <span class="js-number">1</span>.<span class="js-number">0</span>
					<span class="js-bracket">}</span>, <span class="js-number">1</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-number">0</span>, <span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span><span class="js-comment">//Fade new image in
</span>
						act.removeClass<span class="js-bracket">(</span><span class="js-string">'active last-active'</span><span class="js-bracket">)</span>;
						<span class="js-comment">//Remove classes &quot;active&quot; and &quot;last-active&quot;
</span>
					<span class="js-bracket">}</span><span class="js-bracket">)</span>;
				<span class="js-bracket">}</span><span class="js-bracket">)</span>;
			<span class="js-bracket">}</span>
		</span></span>&lt;/script&gt;</span>
	<span class="html-other-element">&lt;/head&gt;</span>
	<span class="html-other-element">&lt;body&gt;</span>
		<span class="html-other-element">&lt;div id=<span class="html-attribute">&quot;frame&quot;</span>&gt;</span>
			<span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;imaged.png&quot;</span> alt=<span class="html-attribute">&quot;d&quot;</span> class=<span class="html-attribute">&quot;append_image&quot;</span>&gt;</span>
		<span class="html-other-element">&lt;/div&gt;</span>
		<span class="html-other-element">&lt;div id=<span class="html-attribute">&quot;slide&quot;</span>&gt;</span>
			<span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;imagea.png&quot;</span> alt=<span class="html-attribute">&quot;a&quot;</span> class=<span class="html-attribute">&quot;active&quot;</span>&gt;</span>
			<span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;imageb.png&quot;</span> alt=<span class="html-attribute">&quot;b&quot;</span>&gt;</span>
			<span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;imagec.png&quot;</span> alt=<span class="html-attribute">&quot;c&quot;</span>&gt;</span>
			<span class="html-image-element">&lt;img src=<span class="html-attribute">&quot;imaged.png&quot;</span> alt=<span class="html-attribute">&quot;d&quot;</span>&gt;</span>
		<span class="html-other-element">&lt;/div&gt;</span>
	<span class="html-other-element">&lt;/body&gt;</span>
<span class="html-other-element">&lt;/html&gt;</span></span></pre>
</div>
<img src="http://feeds.feedburner.com/~r/rrpowereds/~4/g4VXjGW_8zU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.rrpowered.com/2012/02/jquery-simple-image-slide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.rrpowered.com/2012/02/jquery-simple-image-slide/</feedburner:origLink></item>
		<item>
		<title>jQuery Growing Menu</title>
		<link>http://feedproxy.google.com/~r/rrpowereds/~3/fSPYO7vaHAk/</link>
		<comments>http://www.rrpowered.com/2012/02/jquery-growing-menu/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 05:44:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Animated]]></category>
		<category><![CDATA[Growing]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Menu]]></category>

		<guid isPermaLink="false">http://www.rrpowered.com/?p=498</guid>
		<description><![CDATA[Today We are gonna make a horizontal expanding menu using jQuery and css. &#160; Demo Let&#8217;s start with the jQuery. When the menu gets moused over we will animate and show the hidden text. On mouseout will will hide the &#8230; <a href="http://www.rrpowered.com/2012/02/jquery-growing-menu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>Today We are gonna make a horizontal expanding menu using jQuery and css.</h5>
<p><a href="http://www.rrpowered.com/2012/02/jquery-growing-menu/" class="image-post"><img src="http://www.rrpowered.com/images/growingmenu.png" alt="" class="post-img" /></a><br />
<span id="more-498"></span><br />
&nbsp;<br />
<a href="http://www.rrpowered.com/demo/growingmenu/" alt="img" class="demo">Demo</a><br />
<b>Let&#8217;s start with the jQuery.</b><br />
When the menu gets moused over we will animate and show the hidden text. On mouseout will will hide the text once again.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre>
<pre><span class="js">$<span class="js-bracket">(</span><span class="js-client-keyword">document</span><span class="js-bracket">)</span>.ready<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
    $<span class="js-bracket">(</span><span class="js-string">&quot;.nav_bar li&quot;</span><span class="js-bracket">)</span>.mouseover<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
        $<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.<span class="js-client-keyword">stop</span><span class="js-bracket">(</span><span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>
            width <span class="js-operator">:</span> <span class="js-string">'350px'</span>
        <span class="js-bracket">}</span>, <span class="js-number">5</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-bracket">)</span>;
    <span class="js-bracket">}</span><span class="js-bracket">)</span>;

    $<span class="js-bracket">(</span><span class="js-string">&quot;.nav_bar li&quot;</span><span class="js-bracket">)</span>.mouseout<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
        $<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.<span class="js-client-keyword">stop</span><span class="js-bracket">(</span><span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>
            width <span class="js-operator">:</span> <span class="js-string">'130px'</span>
        <span class="js-bracket">}</span>, <span class="js-number">5</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-bracket">)</span>;
    <span class="js-bracket">}</span><span class="js-bracket">)</span>;
<span class="js-bracket">}</span><span class="js-bracket">)</span>;</span></pre>
</div>
<p><b>The HTML structure.</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
</pre>
<pre><span class="html"><span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;nav_bar&quot;</span>&gt;</span>
	<span class="html-other-element">&lt;ul&gt;</span>
		<span class="html-other-element">&lt;li&gt;</span>
			<span class="html-other-element">&lt;span&gt;</span>Menu Tab 1<span class="html-other-element">&lt;/span&gt;</span>
			<span class="html-other-element">&lt;span class=<span class="html-attribute">&quot;whole&quot;</span>&gt;</span>The Whole Menu Tab 1<span class="html-other-element">&lt;/span&gt;</span>
		<span class="html-other-element">&lt;/li&gt;</span>
		<span class="html-other-element">&lt;li&gt;</span>
			<span class="html-other-element">&lt;span&gt;</span>Menu Tab 2<span class="html-other-element">&lt;/span&gt;</span>
			<span class="html-other-element">&lt;span class=<span class="html-attribute">&quot;whole&quot;</span>&gt;</span>The Whole Menu Tab 2<span class="html-other-element">&lt;/span&gt;</span>
		<span class="html-other-element">&lt;/li&gt;</span>
		<span class="html-other-element">&lt;li&gt;</span>
			<span class="html-other-element">&lt;span&gt;</span>Menu Tab 3<span class="html-other-element">&lt;/span&gt;</span>
			<span class="html-other-element">&lt;span class=<span class="html-attribute">&quot;whole&quot;</span>&gt;</span>The Whole Menu Tab 3<span class="html-other-element">&lt;/span&gt;</span>
		<span class="html-other-element">&lt;/li&gt;</span>
		<span class="html-other-element">&lt;li&gt;</span>
			<span class="html-other-element">&lt;span&gt;</span>Menu Tab 4<span class="html-other-element">&lt;/span&gt;</span>
			<span class="html-other-element">&lt;span class=<span class="html-attribute">&quot;whole&quot;</span>&gt;</span>The Whole Menu Tab 4<span class="html-other-element">&lt;/span&gt;</span>
		<span class="html-other-element">&lt;/li&gt;</span>
		<span class="html-other-element">&lt;li&gt;</span>
			<span class="html-other-element">&lt;span&gt;</span>Menu Tab 5<span class="html-other-element">&lt;/span&gt;</span>
			<span class="html-other-element">&lt;span class=<span class="html-attribute">&quot;whole&quot;</span>&gt;</span>The Whole Menu Tab 5<span class="html-other-element">&lt;/span&gt;</span>
		<span class="html-other-element">&lt;/li&gt;</span>
		<span class="html-other-element">&lt;li&gt;</span>
			<span class="html-other-element">&lt;span&gt;</span>Menu Tab 6<span class="html-other-element">&lt;/span&gt;</span>
			<span class="html-other-element">&lt;span class=<span class="html-attribute">&quot;whole&quot;</span>&gt;</span>The Whole Menu Tab 6<span class="html-other-element">&lt;/span&gt;</span>
		<span class="html-other-element">&lt;/li&gt;</span>
	<span class="html-other-element">&lt;/ul&gt;</span>
<span class="html-other-element">&lt;/div&gt;</span></span></pre>
</div>
<p><b>Now put it all together!</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
</pre>
<pre><span class="html"><span class="html-comment">&lt;!-- Created by Barrett at RRPowered.com --&gt;</span>
<span class="html-other-element">&lt;!DOCTYPE html PUBLIC <span class="html-attribute">&quot;-//W3C//DTD XHTML 1.1//EN&quot;</span> 
<span class="html-attribute">&quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;</span>&gt;</span>
<span class="html-other-element">&lt;html&gt;</span>
    <span class="html-other-element">&lt;head&gt;</span>
	    <span class="html-script-element">&lt;script type=<span class="html-attribute">&quot;text/javascript&quot;</span> src=<span class="html-attribute">&quot;http://ajax.googleapis.com/
		ajax/libs/jquery/1.7.1/jquery.min.js&quot;</span>&gt;<span class="js"><span class="js"></span></span>&lt;/script&gt;</span>
		<span class="html-other-element">&lt;link rel=<span class="html-attribute">&quot;stylesheet&quot;</span> type=<span class="html-attribute">&quot;text/css&quot;</span> href=<span class="html-attribute">&quot;style.css&quot;</span> /&gt;</span>
		<span class="html-other-element">&lt;title&gt;</span>Growing Menu<span class="html-other-element">&lt;/title&gt;</span>
		<span class="html-script-element">&lt;script type=<span class="html-attribute">&quot;text/javascript&quot;</span>&gt;<span class="js"><span class="js">
			$<span class="js-bracket">(</span><span class="js-client-keyword">document</span><span class="js-bracket">)</span>.ready<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
				$<span class="js-bracket">(</span><span class="js-string">&quot;.nav_bar li&quot;</span><span class="js-bracket">)</span>.mouseover<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
					$<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.<span class="js-client-keyword">stop</span><span class="js-bracket">(</span><span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>
						width <span class="js-operator">:</span> <span class="js-string">'350px'</span>
					<span class="js-bracket">}</span>, <span class="js-number">5</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-bracket">)</span>;
				<span class="js-bracket">}</span><span class="js-bracket">)</span>;

				$<span class="js-bracket">(</span><span class="js-string">&quot;.nav_bar li&quot;</span><span class="js-bracket">)</span>.mouseout<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
					$<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.<span class="js-client-keyword">stop</span><span class="js-bracket">(</span><span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>
						width <span class="js-operator">:</span> <span class="js-string">'130px'</span>
					<span class="js-bracket">}</span>, <span class="js-number">5</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-bracket">)</span>;
				<span class="js-bracket">}</span><span class="js-bracket">)</span>;
			<span class="js-bracket">}</span><span class="js-bracket">)</span>;
		</span></span>&lt;/script&gt;</span>
	<span class="html-other-element">&lt;/head&gt;</span>
	<span class="html-other-element">&lt;body&gt;</span>
		<span class="html-other-element">&lt;h3&gt;</span>Growing Menu with jQuery<span class="html-other-element">&lt;/h3&gt;</span>
		<span class="html-other-element">&lt;div class=<span class="html-attribute">&quot;nav_bar&quot;</span>&gt;</span>
			<span class="html-other-element">&lt;ul&gt;</span>
				<span class="html-other-element">&lt;li&gt;</span>
					<span class="html-other-element">&lt;span&gt;</span>Menu Tab 1<span class="html-other-element">&lt;/span&gt;</span>
					<span class="html-other-element">&lt;span class=<span class="html-attribute">&quot;whole&quot;</span>&gt;</span>The Whole Menu Tab 1<span class="html-other-element">&lt;/span&gt;</span>
				<span class="html-other-element">&lt;/li&gt;</span>
				<span class="html-other-element">&lt;li&gt;</span>
					<span class="html-other-element">&lt;span&gt;</span>Menu Tab 2<span class="html-other-element">&lt;/span&gt;</span>
					<span class="html-other-element">&lt;span class=<span class="html-attribute">&quot;whole&quot;</span>&gt;</span>The Whole Menu Tab 2<span class="html-other-element">&lt;/span&gt;</span>
				<span class="html-other-element">&lt;/li&gt;</span>
				<span class="html-other-element">&lt;li&gt;</span>
					<span class="html-other-element">&lt;span&gt;</span>Menu Tab 3<span class="html-other-element">&lt;/span&gt;</span>
					<span class="html-other-element">&lt;span class=<span class="html-attribute">&quot;whole&quot;</span>&gt;</span>The Whole Menu Tab 3<span class="html-other-element">&lt;/span&gt;</span>
				<span class="html-other-element">&lt;/li&gt;</span>
				<span class="html-other-element">&lt;li&gt;</span>
					<span class="html-other-element">&lt;span&gt;</span>Menu Tab 4<span class="html-other-element">&lt;/span&gt;</span>
					<span class="html-other-element">&lt;span class=<span class="html-attribute">&quot;whole&quot;</span>&gt;</span>The Whole Menu Tab 4<span class="html-other-element">&lt;/span&gt;</span>
				<span class="html-other-element">&lt;/li&gt;</span>
				<span class="html-other-element">&lt;li&gt;</span>
					<span class="html-other-element">&lt;span&gt;</span>Menu Tab 5<span class="html-other-element">&lt;/span&gt;</span>
					<span class="html-other-element">&lt;span class=<span class="html-attribute">&quot;whole&quot;</span>&gt;</span>The Whole Menu Tab 5<span class="html-other-element">&lt;/span&gt;</span>
				<span class="html-other-element">&lt;/li&gt;</span>
				<span class="html-other-element">&lt;li&gt;</span>
					<span class="html-other-element">&lt;span&gt;</span>Menu Tab 6<span class="html-other-element">&lt;/span&gt;</span>
					<span class="html-other-element">&lt;span class=<span class="html-attribute">&quot;whole&quot;</span>&gt;</span>The Whole Menu Tab 6<span class="html-other-element">&lt;/span&gt;</span>
				<span class="html-other-element">&lt;/li&gt;</span>
			<span class="html-other-element">&lt;/ul&gt;</span>
		<span class="html-other-element">&lt;/div&gt;</span>
	<span class="html-other-element">&lt;/body&gt;</span>
<span class="html-other-element">&lt;/html&gt;</span></span></pre>
</div>
<p><b>Now for the styling</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
</pre>
<pre><span class="css"><span class="css-comment">/*Created by Barrett at RRPowered.com*/</span>
body {
	<span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 0</span></span>;
	<span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 0</span></span>;
	<span class="css-property">font-family<span class="css-selector">:</span><span class="css-value"> <span class="css-string">&quot;arial&quot;</span></span></span>;
	<span class="css-property">font-size<span class="css-selector">:</span><span class="css-value"> 12px</span></span>;
}
span {
	<span class="css-property">float<span class="css-selector">:</span><span class="css-value"> left</span></span>;
	<span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 6px 8px 6px 8px</span></span>;
}
.nav_bar {
	<span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 230px</span></span>;
	<span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 0 auto</span></span>;
}
.nav_bar ul {
	<span class="css-property">padding<span class="css-selector">:</span><span class="css-value"> 0</span></span>;
	<span class="css-property">margin<span class="css-selector">:</span><span class="css-value"> 0</span></span>;
	<span class="css-property">list-style<span class="css-selector">:</span><span class="css-value"> none</span></span>;
}
.nav_bar li {
	<span class="css-property">background-color<span class="css-selector">:</span><span class="css-value"> #f5f5f5</span></span>;
	<span class="css-property">cursor<span class="css-selector">:</span><span class="css-value"> pointer</span></span>;
	<span class="css-property">font-weight<span class="css-selector">:</span><span class="css-value"> bold</span></span>;
	<span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 130px</span></span>;
	<span class="css-property">overflow<span class="css-selector">:</span><span class="css-value"> hidden</span></span>;
	<span class="css-property">max-height<span class="css-selector">:</span><span class="css-value"> 26px</span></span>;
}
.whole {
	<span class="css-property">background-color<span class="css-selector">:</span><span class="css-value"> #f5f5f5</span></span>;
	<span class="css-property">margin-left<span class="css-selector">:</span><span class="css-value"> 50px</span></span>;
	<span class="css-property">font-weight<span class="css-selector">:</span><span class="css-value"> normal</span></span>;
	<span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 150px</span></span>;
}</span></pre>
</div>
<img src="http://feeds.feedburner.com/~r/rrpowereds/~4/fSPYO7vaHAk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.rrpowered.com/2012/02/jquery-growing-menu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.rrpowered.com/2012/02/jquery-growing-menu/</feedburner:origLink></item>
		<item>
		<title>Use PHP to show a part of your text</title>
		<link>http://feedproxy.google.com/~r/rrpowereds/~3/XfflIb4CQNc/</link>
		<comments>http://www.rrpowered.com/2012/01/use-php-to-show-a-part-of-your-text/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 06:37:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[substr]]></category>
		<category><![CDATA[Text]]></category>

		<guid isPermaLink="false">http://www.rrpowered.com/?p=491</guid>
		<description><![CDATA[Use PHP to show only a part of your text by adding “…” to the end of your message after 10 characters. We&#8217;re gonna start with our text in a variable. 1 2 3 4 5 6 7 $message=&#34;Lorem ipsum &#8230; <a href="http://www.rrpowered.com/2012/01/use-php-to-show-a-part-of-your-text/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>Use PHP to show only a part of your text by adding “…” to the end of your message after 10 characters.</h5>
<p><a href="http://www.rrpowered.com/2012/01/use-php-to-show-a-part-of-your-text/" class="image-post"><img src="http://www.rrpowered.com/images/short.png" alt="" class="post-img" /></a><br />
<span id="more-491"></span><br />
We&#8217;re gonna start with our text in a variable.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
</pre>
<pre><span class="php"><span class="php-var">$message</span><span class="php-operator">=</span><span class="php-string">&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam in erat 
nec lacus condimentum hendrerit. Vestibulum fringilla ornare augue ut sagittis. 
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis 
egestas. Vivamus urna nibh, tristique a suscipit sit amet, tempus vitae lectus.&quot;</span>;</span></pre>
</div>
<p><b>Okay here we go!!!</b><br />
We use the PHP function <b>strlen()</b> to get the length of the text in our variable. Then use the PHP function <b>substr()</b> to only shoe the first 10 characters from the text in our variable. </p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
</pre>
<pre><span class="php"><span class="php-var">$VarLength</span> <span class="php-operator">=</span> <span class="php-function">strlen</span><span class="php-brackets">(</span><span class="php-var">$message</span><span class="php-brackets">)</span>;
<span class="php-comment">//The length set to 10
</span>
<span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-var">$VarLength</span> <span class="php-operator">&gt;</span> <span class="php-number">1</span><span class="php-number">0</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
<span class="php-comment">/*Add &quot;...&quot; after 10 charecters*/</span> 
<span class="php-var">$message</span> <span class="php-operator">=</span> <span class="php-function">substr</span><span class="php-brackets">(</span><span class="php-var">$message</span>,<span class="php-number">0</span>,<span class="php-number">1</span><span class="php-number">0</span><span class="php-brackets">)</span> <span class="php-operator">.</span> <span class="php-string">&quot;...&quot;</span>; 
<span class="php-brackets">}</span>
<span class="php-keyword">echo</span> <span class="php-var">$message</span>;</span></pre>
</div>
<img src="http://feeds.feedburner.com/~r/rrpowereds/~4/XfflIb4CQNc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.rrpowered.com/2012/01/use-php-to-show-a-part-of-your-text/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.rrpowered.com/2012/01/use-php-to-show-a-part-of-your-text/</feedburner:origLink></item>
		<item>
		<title>jQuery plugin get variable from plugin</title>
		<link>http://feedproxy.google.com/~r/rrpowereds/~3/7c7Z43kVXg8/</link>
		<comments>http://www.rrpowered.com/2012/01/jquery-plugin-get-variable-from-plugin/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 02:55:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Plugin variable]]></category>

		<guid isPermaLink="false">http://www.rrpowered.com/?p=325</guid>
		<description><![CDATA[Today I will show you how to get a variable from your plugin. Lets say you want to know what a variable is that was passing to your plugin. What we have here is the the plugin called myplugin with &#8230; <a href="http://www.rrpowered.com/2012/01/jquery-plugin-get-variable-from-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>Today I will show you how to get a variable from your plugin. Lets say you want to know what a variable is that was passing to your plugin.</h5>
<p><a href="http://www.rrpowered.com/2012/01/jquery-plugin-get-variable-from-plugin/" class="image-post"><img src="http://www.rrpowered.com/images/pg.png" alt="" class="post-img" /></a><br />
<span id="more-325"></span><br />
What we have here is the the plugin called <b>myplugin</b> with a <b>function(callback)</b> </p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
</pre>
<pre><span class="js">$<span class="js-bracket">(</span><span class="js-string">&quot;#test-div&quot;</span><span class="js-bracket">)</span>.myplugin<span class="js-bracket">(</span>
<span class="js-function-keyword">function</span><span class="js-bracket">(</span>callback<span class="js-bracket">)</span><span class="js-bracket">{</span>
<span class="js-reserved-keyword">if</span><span class="js-bracket">(</span>callback <span class="js-operator">=</span><span class="js-operator">=</span> <span class="js-number">1</span><span class="js-bracket">)</span><span class="js-bracket">{</span>
<span class="js-client-keyword">alert</span><span class="js-bracket">(</span><span class="js-string">&quot;test variable equals 1&quot;</span><span class="js-bracket">)</span>;
<span class="js-bracket">}</span>
<span class="js-bracket">}</span><span class="js-bracket">)</span>;</span></pre>
</div>
<p><b>The plugin</b><br />
Ok, here is the plugin.<br />
Now to send a variable back to our plugin call. We set a variable called <b>testvariable</b>. Then we create a function called <b>callback</b> with the variable <b>testvariable</b>.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
</pre>
<pre><span class="js"><span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span>$<span class="js-bracket">)</span><span class="js-bracket">{</span>
$.fn.myplugin <span class="js-operator">=</span> <span class="js-function-keyword">function</span><span class="js-bracket">(</span>callback<span class="js-bracket">)</span><span class="js-bracket">{</span>  
<span class="js-reserved-keyword">var</span> testvariable<span class="js-operator">=</span><span class="js-number">1</span>;
callback<span class="js-bracket">(</span>testvariable<span class="js-bracket">)</span>;
<span class="js-bracket">}</span>
<span class="js-bracket">}</span><span class="js-bracket">)</span><span class="js-bracket">(</span>jQuery<span class="js-bracket">)</span>;</span></pre>
</div>
<img src="http://feeds.feedburner.com/~r/rrpowereds/~4/7c7Z43kVXg8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.rrpowered.com/2012/01/jquery-plugin-get-variable-from-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.rrpowered.com/2012/01/jquery-plugin-get-variable-from-plugin/</feedburner:origLink></item>
		<item>
		<title>PHP Time Ago</title>
		<link>http://feedproxy.google.com/~r/rrpowereds/~3/r09q29zBOxE/</link>
		<comments>http://www.rrpowered.com/2012/01/php-time-ago/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 21:34:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Ago]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[Time Ago]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://www.rrpowered.com/?p=469</guid>
		<description><![CDATA[A simple way to display ago with UNIX time. Displaying the time ago. To display the time ago. Just add this where you want to display the time ago. 1 2 3 4 5 6 7 8 9 10 11 &#8230; <a href="http://www.rrpowered.com/2012/01/php-time-ago/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>A simple way to display ago with UNIX time.</h5>
<p><a href="http://www.rrpowered.com/2012/01/php-time-ago/" class="image-post"><img src="http://www.rrpowered.com/images/phpago.png" alt="" class="post-img" /></a><br />
<span id="more-469"></span><br />
<b>Displaying the time ago.</b><br />
To display the time ago. Just add this where you want to display the time ago.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
</pre>
<pre><span class="php"><span class="php-script-tag">&lt;?</span>PHP
<span class="php-comment">/*Created by Barrett at RRPowered.com*/</span>
<span class="php-keyword">include_once</span><span class="php-brackets">(</span><span class="php-string">'ago.php'</span><span class="php-brackets">)</span>;<span class="php-comment">//Include the ago.php file 
</span>
<span class="php-var">$cur_time1</span> <span class="php-operator">=</span><span class="php-string">&quot;1291684422&quot;</span>;<span class="php-comment">//Your Unix time from database
</span>
<span class="php-keyword">echo</span> time_ago<span class="php-brackets">(</span><span class="php-var">$cur_time1</span><span class="php-brackets">)</span> ;
<span class="php-script-tag">?&gt;<span class="html"></span></span></span></pre>
</div>
<p>&nbsp;<br />
<br />
<b>Here is the PHP file!</b><br />
This file is called <b>ago.php</b></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
</pre>
<pre><span class="php"><span class="php-script-tag">&lt;?</span>PHP
<span class="php-comment">/*Created by Barrett at RRPowered.com*/</span>
<span class="php-comment">//Call the function
</span>
<span class="php-function">function</span> time_ago<span class="php-brackets">(</span><span class="php-var">$cur_time</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
<span class="php-var">$time_</span> <span class="php-operator">=</span> <span class="php-function">time</span><span class="php-brackets">(</span><span class="php-brackets">)</span> <span class="php-operator">-</span> <span class="php-var">$cur_time</span>;
 
<span class="php-var">$seconds</span> <span class="php-operator">=</span><span class="php-var">$time_</span>;
<span class="php-var">$minutes</span> <span class="php-operator">=</span> <span class="php-function">round</span><span class="php-brackets">(</span><span class="php-var">$time_</span> <span class="php-operator">/</span> <span class="php-number">6</span><span class="php-number">0</span><span class="php-brackets">)</span>;
<span class="php-var">$hours</span> <span class="php-operator">=</span> <span class="php-function">round</span><span class="php-brackets">(</span><span class="php-var">$time_</span> <span class="php-operator">/</span> <span class="php-number">3</span><span class="php-number">6</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-brackets">)</span>;
<span class="php-var">$days</span> <span class="php-operator">=</span> <span class="php-function">round</span><span class="php-brackets">(</span><span class="php-var">$time_</span> <span class="php-operator">/</span> <span class="php-number">8</span><span class="php-number">6</span><span class="php-number">4</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-brackets">)</span>;
<span class="php-var">$weeks</span> <span class="php-operator">=</span> <span class="php-function">round</span><span class="php-brackets">(</span><span class="php-var">$time_</span> <span class="php-operator">/</span> <span class="php-number">6</span><span class="php-number">0</span><span class="php-number">4</span><span class="php-number">8</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-brackets">)</span>;
<span class="php-var">$months</span> <span class="php-operator">=</span> <span class="php-function">round</span><span class="php-brackets">(</span><span class="php-var">$time_</span> <span class="php-operator">/</span> <span class="php-number">2</span><span class="php-number">4</span><span class="php-number">1</span><span class="php-number">9</span><span class="php-number">2</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-brackets">)</span>;
<span class="php-var">$years</span> <span class="php-operator">=</span> <span class="php-function">round</span><span class="php-brackets">(</span><span class="php-var">$time_</span> <span class="php-operator">/</span> <span class="php-number">2</span><span class="php-number">9</span><span class="php-number">0</span><span class="php-number">3</span><span class="php-number">0</span><span class="php-number">4</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-brackets">)</span>;
 
<span class="php-comment">//Seconds
</span>
<span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$seconds</span> <span class="php-operator">&lt;</span><span class="php-operator">=</span> <span class="php-number">6</span><span class="php-number">0</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
 
   <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;$seconds seconds ago&quot;</span>;   
 
<span class="php-comment">//Minutes    
</span>
<span class="php-brackets">}</span><span class="php-keyword">else</span> <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$minutes</span> <span class="php-operator">&lt;</span><span class="php-operator">=</span> <span class="php-number">6</span><span class="php-number">0</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
 
   <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$minutes</span> <span class="php-operator">=</span><span class="php-operator">=</span> <span class="php-number">1</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
   <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;one minute ago&quot;</span>;
   <span class="php-brackets">}</span><span class="php-keyword">else</span><span class="php-brackets">{</span>
   <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;$minutes minutes ago&quot;</span>;
   <span class="php-brackets">}</span>
 
<span class="php-comment">//Hours
</span>
<span class="php-brackets">}</span><span class="php-keyword">else</span> <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$hours</span> <span class="php-operator">&lt;</span><span class="php-operator">=</span> <span class="php-number">2</span><span class="php-number">4</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
 
  <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$hours</span> <span class="php-operator">=</span><span class="php-operator">=</span> <span class="php-number">1</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
  <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;one hour ago&quot;</span>;
  <span class="php-brackets">}</span><span class="php-keyword">else</span><span class="php-brackets">{</span>
  <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;$hours hours ago&quot;</span>;
  <span class="php-brackets">}</span>
 
<span class="php-comment">//Days 
</span>
<span class="php-brackets">}</span><span class="php-keyword">else</span> <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$days</span> <span class="php-operator">&lt;</span><span class="php-operator">=</span> <span class="php-number">7</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
 
   <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$days</span> <span class="php-operator">=</span><span class="php-operator">=</span> <span class="php-number">1</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
   <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;one day ago&quot;</span>;
   <span class="php-brackets">}</span><span class="php-keyword">else</span><span class="php-brackets">{</span>
   <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;$days days ago&quot;</span>;
   <span class="php-brackets">}</span>
 
<span class="php-comment">//Weeks
</span>
<span class="php-brackets">}</span><span class="php-keyword">else</span> <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$weeks</span> <span class="php-operator">&lt;</span><span class="php-operator">=</span> <span class="php-number">4</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
 
  <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$weeks</span> <span class="php-operator">=</span><span class="php-operator">=</span> <span class="php-number">1</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
  <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;one week ago&quot;</span>;
  <span class="php-brackets">}</span><span class="php-keyword">else</span><span class="php-brackets">{</span>
  <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;$weeks weeks ago&quot;</span>;
  <span class="php-brackets">}</span>
 
<span class="php-comment">//Months  
</span>
<span class="php-brackets">}</span><span class="php-keyword">else</span> <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$months</span> <span class="php-operator">&lt;</span><span class="php-operator">=</span> <span class="php-number">1</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
 
  <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$months</span> <span class="php-operator">=</span><span class="php-operator">=</span> <span class="php-number">1</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
  <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;one month ago&quot;</span>;
  <span class="php-brackets">}</span><span class="php-keyword">else</span><span class="php-brackets">{</span>
  <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;$months months ago&quot;</span>;
  <span class="php-brackets">}</span>
 
<span class="php-comment">//Years 
</span>
<span class="php-brackets">}</span><span class="php-keyword">else</span><span class="php-brackets">{</span>  
 
  <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$year</span> <span class="php-operator">=</span><span class="php-operator">=</span> <span class="php-number">1</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
  <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;one year ago&quot;</span>;
  <span class="php-brackets">}</span><span class="php-keyword">else</span><span class="php-brackets">{</span>
  <span class="php-var">$time</span><span class="php-operator">=</span><span class="php-string">&quot;$year years ago&quot;</span>;
  <span class="php-brackets">}</span>  
 
<span class="php-brackets">}</span>
<span class="php-keyword">return</span> <span class="php-var">$time</span>;
<span class="php-brackets">}</span>
<span class="php-script-tag">?&gt;<span class="html"></span></span></span></pre>
</div>
<img src="http://feeds.feedburner.com/~r/rrpowereds/~4/r09q29zBOxE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.rrpowered.com/2012/01/php-time-ago/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.rrpowered.com/2012/01/php-time-ago/</feedburner:origLink></item>
		<item>
		<title>Check If A Users Picture Exists Using PHP</title>
		<link>http://feedproxy.google.com/~r/rrpowereds/~3/y658ZpaScEE/</link>
		<comments>http://www.rrpowered.com/2012/01/check-if-a-users-picture-exists-using-php/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 05:03:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Check]]></category>
		<category><![CDATA[Check If users Picture Exists]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Users image]]></category>

		<guid isPermaLink="false">http://www.rrpowered.com/?p=464</guid>
		<description><![CDATA[Today We will use PHP to check if a users picture exists. Let&#8217;s get started! First We set the users and default picture location into a variable. Next We check if the users picture exists. If the users picture exists &#8230; <a href="http://www.rrpowered.com/2012/01/check-if-a-users-picture-exists-using-php/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h5>Today We will use PHP to check if a users picture exists.</h5>
<p><a href="http://www.rrpowered.com/2012/01/check-if-a-users-picture-exists-using-php/" class="image-post"><img src="http://www.rrpowered.com/images/checkpic.png" alt="" class="post-img" /></a><br />
<span id="more-464"></span><br />
<b>Let&#8217;s get started!</b><br />
First We set the users and default picture location into a variable. Next We check if the users picture exists. If the users picture exists We will display it. If not We show the default picture.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
</pre>
<pre><span class="php"><span class="php-comment">/*The location to the default picture*/</span>
<span class="php-var">$no_picture</span><span class="php-operator">=</span><span class="php-string">&quot;default.jpg&quot;</span>;
 
<span class="php-comment">/*The location to the users picture*/</span>
<span class="php-var">$picture</span><span class="php-operator">=</span><span class="php-string">&quot;$user/picture.jpg&quot;</span>;
 
<span class="php-comment">/*We will use the PHP file_exists function*/</span>
<span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-function">file_exists</span><span class="php-brackets">(</span><span class="php-var">$picture</span><span class="php-brackets">)</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
<span class="php-comment">/*If users picture exists show it*/</span>
<span class="php-var">$pic</span><span class="php-operator">=</span><span class="php-string">'&lt;img src=&quot;'</span><span class="php-operator">.</span><span class="php-var">$picture</span><span class="php-operator">.</span><span class="php-string">'&quot; alt=&quot;&quot; /&gt;'</span>; 
<span class="php-brackets">}</span><span class="php-keyword">else</span><span class="php-brackets">{</span>
<span class="php-comment">/*If users picture dose not exists shoe default picture instead*/</span>
<span class="php-var">$pic</span><span class="php-operator">=</span><span class="php-string">'&lt;img src=&quot;'</span><span class="php-operator">.</span><span class="php-var">$no_picture</span><span class="php-operator">.</span><span class="php-string">'&quot; alt=&quot;&quot; /&gt;'</span>; 
<span class="php-brackets">}</span>
 
<span class="php-comment">/*Usage*/</span>
<span class="php-keyword">echo</span> <span class="php-var">$pic</span></span></pre>
</div>
<p>&nbsp;<br />
<br />
<b>Used in a function</b><br />
We can also put it in a Function. Like this!</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
</pre>
<pre><span class="php"><span class="php-function">function</span> UserPic<span class="php-brackets">(</span><span class="php-var">$user</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
<span class="php-comment">/*The location to the default picture*/</span>
 
<span class="php-var">$no_picture</span><span class="php-operator">=</span><span class="php-string">&quot;default.jpg&quot;</span>;
<span class="php-comment">/*The location to the users picture*/</span>
<span class="php-var">$picture</span><span class="php-operator">=</span><span class="php-string">&quot;$user/picture.jpg&quot;</span>;
 
<span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-function">file_exists</span><span class="php-brackets">(</span><span class="php-var">$picture</span><span class="php-brackets">)</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
<span class="php-var">$pic</span><span class="php-operator">=</span><span class="php-string">'&lt;img src=&quot;'</span><span class="php-operator">.</span><span class="php-var">$picture</span><span class="php-operator">.</span><span class="php-string">'&quot; alt=&quot;&quot; /&gt;'</span>; 
<span class="php-brackets">}</span><span class="php-keyword">else</span><span class="php-brackets">{</span>
<span class="php-var">$pic</span><span class="php-operator">=</span><span class="php-string">'&lt;img src=&quot;'</span><span class="php-operator">.</span><span class="php-var">$no_picture</span><span class="php-operator">.</span><span class="php-string">'&quot; alt=&quot;&quot; /&gt;'</span>; 
<span class="php-brackets">}</span>
<span class="php-keyword">return</span> <span class="php-var">$pic</span>;
<span class="php-brackets">}</span>
 
<span class="php-comment">/*Usage*/</span>
UserPic<span class="php-brackets">(</span><span class="php-var">$user</span><span class="php-brackets">)</span></span></pre>
</div>
<img src="http://feeds.feedburner.com/~r/rrpowereds/~4/y658ZpaScEE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.rrpowered.com/2012/01/check-if-a-users-picture-exists-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.rrpowered.com/2012/01/check-if-a-users-picture-exists-using-php/</feedburner:origLink></item>
	</channel>
</rss>
