<?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>mclelun &#187; JavaScript</title>
	<atom:link href="http://www.mclelun.com/blog/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mclelun.com/blog</link>
	<description>Design + Programming = Multitask</description>
	<lastBuildDate>Thu, 26 Aug 2010 15:00:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>jQuery Twitter Update List</title>
		<link>http://www.mclelun.com/blog/2010/01/jquery-twitter-update-list/</link>
		<comments>http://www.mclelun.com/blog/2010/01/jquery-twitter-update-list/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 15:29:06 +0000</pubDate>
		<dc:creator>mclelun</dc:creator>
				<category><![CDATA[Scripting and Coding]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.mclelun.com/blog/?p=12</guid>
		<description><![CDATA[After my first experiment using jQuery to develop a rotating banner, I noticed that the script I wrote could be use for other similar list items such as a Twitter update list. To retrieve recent my tweets, I paste the following JavaScript provided by Twitter into the &#60;body&#62; of my page. &#60;script src="http://twitter.com/javascripts/blogger.js"&#62;&#60;/script&#62; &#60;script src="http://twitter.com/statuses/user_timeline/username.json?callback=twitterCallback2&#38;count=3"&#62;&#60;/script&#62; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mclelun.com/lab/jqtwitter/" target="_blank"><img src="http://www.mclelun.com/img/blog/100116_jqtwitter_h.gif" alt="jQuery Twitter Update List" /></a></p>
<p>After my first experiment using jQuery to develop a rotating banner, I noticed that the script I wrote could be use for other similar list items such as a Twitter update list.</p>
<p><span id="more-12"></span></p>
<p>To retrieve recent my tweets, I paste the following JavaScript provided by Twitter into the <code>&lt;body&gt;</code> of my page. </p>
<p><code>&lt;script src="http://twitter.com/javascripts/blogger.js"&gt;&lt;/script&gt;<br />
&lt;script src="http://twitter.com/statuses/user_timeline/username.json?callback=twitterCallback2&amp;count=3"&gt;&lt;/script&gt;</code></p>
<p>Then, I make some simple changes to my jQuery rotating banner script and CSS. Viola! The twitter update list is working as expected. You can view the demo in this <a href="http://www.mclelun.com/lab/jqtwitter/" target="_blank">page</a>.</p>
<h3>Download</h3>
<p>To use this twitter update list, You will need to replace the <code>username</code> with your twitter name. You can also specify how many tweets to retrieve by changing the value of <code>count</code> parameter.</p>
<p><a href="http://www.mclelun.com/lab/jqtwitter/jqtwitter.js">jqtwitter.js</a> 1KB<br />
<a href="http://www.mclelun.com/lab/jqtwitter/jqtwitter.zip">jqbanner.zip</a> 35.5KB</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mclelun.com/blog/2010/01/jquery-twitter-update-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Pong Game</title>
		<link>http://www.mclelun.com/blog/2010/01/javascript-pong-game/</link>
		<comments>http://www.mclelun.com/blog/2010/01/javascript-pong-game/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 18:23:43 +0000</pubDate>
		<dc:creator>mclelun</dc:creator>
				<category><![CDATA[Scripting and Coding]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.mclelun.com/blog/?p=10</guid>
		<description><![CDATA[Back then, most JavaScript usage I saw was just for something simple such as bookmark or pop up window. There weren&#8217;t many fancy examples but this is not true nowadays. Two years had pass since I heard about Ajax from a friend, I finally decide to spend some time on JavaScript. JavaScript and ActionScript Both [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mclelun.com/lab/jspong/" target="_blank"><img src="http://www.mclelun.com/img/blog/100110_jspong_h.gif" alt="JavaScript Pong" /></a></p>
<p>Back then, most JavaScript usage I saw was just for something simple such as bookmark or pop up window. There weren&#8217;t many fancy examples but this is not true nowadays. Two years had pass since I heard about Ajax from a friend, I finally decide to spend some time on JavaScript.</p>
<p><span id="more-10"></span></p>
<h3>JavaScript and ActionScript</h3>
<p>Both JavaScript and ActionScript are based on ECMAScript which means they share identical syntax. So, I don&#8217;t really have a hard time to understand the basic of JavaScript. </p>
<h3>JavaScript Game</h3>
<p>For me, the best way to learn is to get my hands dirty instead of reading tons of text and did nothing. I manage did a simple Pong game even though my knowledge on JavaScript is limited.The game can be view at this <a href="http://www.mclelun.com/lab/jspong/">page</a>.</p>
<blockquote><p>
Pong (marketed as PONG) is one of the earliest arcade video games, and is a tennis sports game featuring simple two-dimensional graphics &#8211; wiki
</p></blockquote>
<p>Flash game is usually loop with an <code>onEnterFrame</code> event. But there aren&#8217;t any &#8220;frames&#8221; in JavaScript, so we will need to construct the game loop by using a <code>setInterval()</code> method. Both JavaScript and ActionScript&#8217;s <code>setInterval</code> is similar, which execute code periodically.</p>
<p>Of course this little game experiment I did doesn&#8217;t really show the power of what JavaScript could do. So, navigate to <a href="http://www.chromeexperiments.com/" target="_blank">Google&#8217;s Chrome Experiments</a> and have a look at some great experiments did by other PROgrammers.</p>
<h3>Download</h3>
<p><a href="http://www.mclelun.com/lab/jspong/">View JavaScript Pong Game</a><br />
<a href="http://www.mclelun.com/lab/jspong/pong.js">pong.js</a> 2.69KB</p>
<h3>JavaScript Framework</h3>
<p>Besides writing your script from scratch, you could also utilize JavaScript framework which will ease your development process. Below are some of the many JavaScript frameworks available.<br />
<a href="http://jquery.com/">JQuery</a><br />
<a href="http://www.mootools.net/">MooTools</a><br />
<a href="http://developer.yahoo.com/yui/">YUI</a><br />
<a href="http://www.prototypejs.org/">Prototype</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mclelun.com/blog/2010/01/javascript-pong-game/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery Rotating Banner</title>
		<link>http://www.mclelun.com/blog/2010/01/jquery-rotating-banner/</link>
		<comments>http://www.mclelun.com/blog/2010/01/jquery-rotating-banner/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 14:33:24 +0000</pubDate>
		<dc:creator>mclelun</dc:creator>
				<category><![CDATA[Scripting and Coding]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.mclelun.com/blog/?p=8</guid>
		<description><![CDATA[While I was working on the revamp of my site, I noticed I could use a rotating banner in the landing page to show certain works or blog post that I wish to highlight. My first thought was to develop this with Flash, but I changed my mind after thinking that banner like this could [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mclelun.com/lab/jqbanner/" target="_blank"><img src="http://www.mclelun.com/img/blog/100110_jqbanner_h.gif" alt="simple jquery banner" /></a></p>
<p>While I was working on the revamp of my site, I noticed I could use a rotating banner in the landing page to show certain works or blog post that I wish to highlight. My first thought was to develop this with Flash, but I changed my mind after thinking that banner like this could be done easily with just JavaScript.</p>
<p><span id="more-8"></span></p>
<p>While developing this banner, I used a JavaScript Framework, <a href="http://www.jquery.com/" target="_blank">jQuery </a>to speed up the development process. JavaScript is not my strongest point, but I managed to come out with a simple rotating banner. You can view the banner in this <a href="http://www.mclelun.com/lab/jqbanner/" target="_blank">page</a>.</p>
<h3>Features</h3>
<p>Currently, the banner will rotate automatically every few seconds and can be pause or resume anytime by clicking the button on the banner. You can go through the banners by clicking the next or previous buttons too. Slides information text is grab from the container DIV. so, you could basically put text, images or both into the rotating slides.</p>
<h3>Last Update</h3>
<p><strong>31 May 2010</strong><br />
Add in Sliding/Fading animation for title attributes.</p>
<p><strong>30 April 2010</strong><br />
Change to horizontal scrolling of slides, it still can be easily modify to vertical scrolling. The old script of fading in and out of slides is still in the JS.</p>
<p><strong>16 January 2009</strong><br />
Pause and play share a single button now and I had change the structure slightly to allow HTML text in the rotating slides.</p>
<h3>Download</h3>
<p>The script for this banner is quite simple and self explanatory. To use this rotating banner, you will need to download the zip file which contain all the images, CSS and sample HTML page.</p>
<p><a href="http://www.mclelun.com/lab/jqbanner/jqbanner.js">jqbanner.js</a> 2.17KB<br />
<a href="http://www.mclelun.com/lab/jqbanner/jqbanner.zip">jqbanner.zip</a> 35.7KB<br />
<a href="http://www.mclelun.com/lab/jqbanner/jqbanner_v1.zip">jqbanner_v1.zip (Old version) </a> 35.1KB</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mclelun.com/blog/2010/01/jquery-rotating-banner/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
	</channel>
</rss>
