<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Algirdas Varnagiris &#187; fade</title>
	<atom:link href="http://www.varnagiris.net/tag/fade/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.varnagiris.net</link>
	<description>The cyber-place where I live</description>
	<lastBuildDate>Thu, 18 Feb 2010 17:19:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Change content using AJAX with FadeIn FadeOut effect</title>
		<link>http://www.varnagiris.net/2009/02/26/change-content-using-ajax-with-fadein-fadeout-effect/</link>
		<comments>http://www.varnagiris.net/2009/02/26/change-content-using-ajax-with-fadein-fadeout-effect/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 16:34:38 +0000</pubDate>
		<dc:creator>Algirdas</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[fade]]></category>
		<category><![CDATA[java script]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.varnagiris.net/?p=60</guid>
		<description><![CDATA[Here you will find how to do such a trick: when somebody clicks the button, the old content fades out and then the new fades in. To do this I used jQuery witch is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. [...]]]></description>
			<content:encoded><![CDATA[<p>Here you will find how to do such a trick: when somebody clicks the button, the old content fades out and then the new fades in.<br />
To do this I used <a href="http://jquery.com/">jQuery</a> witch is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.<br />
<span id="more-60"></span><br />
The java script code is quite short and easy:</p>
<pre>
<code>
function refreshContent() {
  $("#content").fadeOut("slow", function(){
    $("#content").load("getrandomcontent.php",false, function() {
      $("#content").fadeIn("slow");
    });
  })
  return false;
}
</code>
</pre>
<p>Now you can use this function for a link<br />
<code>&lt;a href="#" onclick="return refreshContent();"&gt;Refresh&lt;/a&gt;</code><br />
When you click it, the content in <strong>div</strong> element with an id <em>&#8220;content&#8221;</em> will be changed. getrandomcontent.php is used to get random content.</p>
<p><a href="http://www.varnagiris.net/wp-content/examples/ajax_fade/">Check our demo</a>.</p>
<p><em>If this post helped you to solve your problem, please donate me. Donation button can be found on the right side of the page.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.varnagiris.net/2009/02/26/change-content-using-ajax-with-fadein-fadeout-effect/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
