<?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>James Padolsey&#187; Screencasts category &#8211; James Padolsey</title>
	<atom:link href="http://james.padolsey.com/category/screencasts/feed/" rel="self" type="application/rss+xml" />
	<link>http://james.padolsey.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 22 Jan 2012 17:04:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Screencast #2 &#8211; Creating the colour-fader</title>
		<link>http://james.padolsey.com/javascript/screencast-2-creating-the-colour-fader/</link>
		<comments>http://james.padolsey.com/javascript/screencast-2-creating-the-colour-fader/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 13:11:29 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Screencast]]></category>

		<guid isPermaLink="false">http://james.padolsey.com/?p=661</guid>
		<description><![CDATA[In this short screencast I will show how to create a &#8220;colour-fader&#8221; with jQuery, much like the one used on this website (up in the header). It&#8217;s not a particularly practical enhancement but I think it&#8217;s a pretty cool feature nonetheless. You can download the&#8230;]]></description>
			<content:encoded><![CDATA[<p>In this short screencast I will show how to create a &#8220;colour-fader&#8221; with jQuery, much like the one used on this website (up in the header). It&#8217;s not a particularly practical enhancement but I think it&#8217;s a pretty cool feature nonetheless. You can download the files created in the screencast <a href="http://james.padolsey.com/videos/headerfadetut/source-files.zip">here [zip]</a>.</p>

<p class="video"><embed src="http://blip.tv/play/AfSiCwA" type="application/x-shockwave-flash" width="615" height="460" allowscriptaccess="always" allowfullscreen="true"></embed></p>

<p>If you watched <a href="http://james.padolsey.com/javascript/screencast-1-event-delegation-in-jquery/">my last screencast</a> I&#8217;m sure you&#8217;ve noticed the vast difference in sound quality; well, that&#8217;s because of my <a href="http://www.dolphinmusic.co.uk/shop_image/product/5956c73bdf5c9aaf352271a4188287a6.jpg">recently acquired Samson mic</a>.</p>

<p><strong>I&#8217;m hoping to begin a podcast show soon</strong>, although I&#8217;m not 100% sure about it. If any of you are interested in possibly co-hosting such a show (even just for one episode) please let me know! If it <em>does</em> happen then the main topics of discussion will be web development, usability, industry news, hopefully with a strong focus on JavaScript.</p>

<p>While I&#8217;ve got your attention here&#8217;s a few links to keep you distracted:</p>

<ul>
<li>Packt Publishing‏ released a sample chapter of the awesome new jQuery book: &#8220;<a href="http://www.packtpub.com/files/learning-jquery-1-3-sample-chapter-4-effects.pdf">Learning jQuery 1.3 &raquo; Chapter 4: Effects</a>&#8220;</li>
<li>Microsoft recently released a new cross-browser &#8220;testing suite&#8221; for us web developers &#8211; &#8220;<a href="http://www.istartedsomething.com/20090318/expression-web-superpreview-cross-browser-testing/">Expression Web &#8216;SuperPreview&#8217; makes cross-browser testing like moist delicious cake</a>&#8220;</li>
<li>Collis Ta&#8217;eed, the co-founder of Envato (Nettuts, Psdttuts, FreelanceSwitch, Themeforest etc.), has started <a href="http://thenetsetter.com/blog/">his own blog</a>!</li>
<li>If you&#8217;re a mobile web developer then you&#8217;ll find these <a href="http://quirksmode.org/m/table.html">compatibility tables</a> by the legendary PPK very useful!</li>
<li>These videos are awesome: &#8220;<a href="http://www.youtube.com/watch?v=qo1d6ttbAq8">Animation vs. Animator</a>&#8221; &#038; &#8220;<a href="http://www.youtube.com/watch?v=RTPpbHueNJ4&#038;feature=related">Animation vs. Animator 2</a>&#8220;</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://james.padolsey.com/javascript/screencast-2-creating-the-colour-fader/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Screencast #1 &#8211; Event Delegation in jQuery</title>
		<link>http://james.padolsey.com/javascript/screencast-1-event-delegation-in-jquery/</link>
		<comments>http://james.padolsey.com/javascript/screencast-1-event-delegation-in-jquery/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 08:17:12 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Event Delegation]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Screencast]]></category>

		<guid isPermaLink="false">http://james.padolsey.com/?p=399</guid>
		<description><![CDATA[Last week Nettuts&#8217; editor Jeffrey posted about a <a href="http://nettuts.com/competitions/nettuts-screencast-competition/">new screencast competition</a>. This isn&#8217;t my entry &#8211; it&#8217;s just a test-runner to see if I&#8217;m any good at the whole screencast thing. It&#8217;s a 30-minute screencast about event delegation in jQuery and in it I explain&#8230;]]></description>
			<content:encoded><![CDATA[<p>Last week Nettuts&#8217; editor Jeffrey posted about a <a href="http://nettuts.com/competitions/nettuts-screencast-competition/">new screencast competition</a>. This isn&#8217;t my entry &#8211; it&#8217;s just a test-runner to see if I&#8217;m any good at the whole screencast thing. It&#8217;s a 30-minute screencast about event delegation in jQuery and in it I explain event bubbling/propagation and then go on to demonstrate how to develop an event delegation plugin for jQuery.</p>

<p>Note: The quality isn&#8217;t too great but if you make it full screen it&#8217;s much better!</p>

<embed src="http://blip.tv/play/AeXeZJL1Tg" type="application/x-shockwave-flash" width="650" height="514" allowscriptaccess="always" allowfullscreen="true"></embed> 

<p>Thanks for watching, if you have any feedback I&#8217;d love to hear it! I&#8217;m planning on recording my entry for that competition soon, it&#8217;ll also be on jQuery although I&#8217;m not sure of the exact topic yet&#8230;</p>


<span id="more-399"></span>

<p>Here&#8217;s the plugin we created in the screencast:</p>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$.<span class="me1">fn</span>.<span class="me1">delegate</span> <span class="sy0">=</span> <span class="kw2">function</span><span class="br0">&#40;</span>selector<span class="sy0">,</span> event<span class="sy0">,</span> action<span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="kw1">return</span> <span class="kw1">this</span><span class="br0">&#91;</span>event.<span class="me1">replace</span><span class="br0">&#40;</span><span class="co2">/^on/</span><span class="sy0">,</span><span class="st0">''</span><span class="br0">&#41;</span><span class="br0">&#93;</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span>e<span class="br0">&#41;</span><span class="br0">&#123;</span>
        <span class="kw2">var</span> target <span class="sy0">=</span> e <span class="sy0">?</span> e.<span class="me1">target</span> <span class="sy0">:</span> window.<span class="me1">event</span>.<span class="me1">srcElement</span><span class="sy0">,</span>
            elements <span class="sy0">=</span> $<span class="br0">&#40;</span>selector<span class="sy0">,</span> <span class="kw1">this</span><span class="br0">&#41;</span><span class="sy0">,</span>
            elementsLength <span class="sy0">=</span> elements.<span class="me1">length</span><span class="sy0">;</span>
&nbsp;
        elementLoop<span class="sy0">:</span>
            <span class="kw1">while</span> <span class="br0">&#40;</span>elementsLength<span class="sy0">--</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
                <span class="kw2">var</span> parents <span class="sy0">=</span> $<span class="br0">&#40;</span>target<span class="br0">&#41;</span>.<span class="me1">parents</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">,</span>
                    parentsLength <span class="sy0">=</span> parents.<span class="me1">length</span><span class="sy0">;</span>
&nbsp;
                parentLoop<span class="sy0">:</span>
                    <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> pi <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span> pi <span class="sy0">&lt;</span> parentsLength<span class="sy0">;</span> pi<span class="sy0">++</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
                        <span class="kw1">if</span> <span class="br0">&#40;</span> $<span class="br0">&#40;</span>parents<span class="br0">&#91;</span>pi<span class="br0">&#93;</span><span class="br0">&#41;</span>.<span class="kw1">is</span><span class="br0">&#40;</span>selector<span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span>
                            <span class="kw1">return</span> action.<span class="me1">call</span><span class="br0">&#40;</span>elements<span class="br0">&#91;</span>elementsLength<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span>
                        <span class="br0">&#125;</span>
                    <span class="br0">&#125;</span>
&nbsp;
                <span class="kw1">if</span> <span class="br0">&#40;</span>elements<span class="br0">&#91;</span>elementsLength<span class="br0">&#93;</span> <span class="sy0">===</span> target<span class="br0">&#41;</span> <span class="br0">&#123;</span>
                    <span class="kw1">return</span> action.<span class="me1">call</span><span class="br0">&#40;</span>elements<span class="br0">&#91;</span>elementsLength<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span>
                <span class="br0">&#125;</span>
            <span class="br0">&#125;</span>
&nbsp;
        <span class="kw1">return</span> <span class="kw2">true</span><span class="sy0">;</span> <span class="co1">// We don't want to prevent default action so returning true is best</span>
    <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="co1">// USAGE EXAMPLE:</span>
$<span class="br0">&#40;</span><span class="st0">'ul'</span><span class="br0">&#41;</span>.<span class="me1">delegate</span><span class="br0">&#40;</span><span class="st0">'li'</span><span class="sy0">,</span> <span class="st0">'click'</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
    $<span class="br0">&#40;</span><span class="kw1">this</span><span class="br0">&#41;</span>.<span class="me1">parent</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">append</span><span class="br0">&#40;</span> $<span class="br0">&#40;</span><span class="kw1">this</span><span class="br0">&#41;</span>.<span class="me1">clone</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>


]]></content:encoded>
			<wfw:commentRss>http://james.padolsey.com/javascript/screencast-1-event-delegation-in-jquery/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>

