<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: JavaScript Event Delegation is Easier than You Think</title>
	<atom:link href="http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<pubDate>Tue, 02 Dec 2008 00:35:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Anonymous</title>
		<link>http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/#comment-840218</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 27 Nov 2008 14:54:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2684#comment-840218</guid>
		<description>hhahahahahhahaha</description>
		<content:encoded><![CDATA[<p>hhahahahahhahaha</p>]]></content:encoded>
	</item>
	<item>
		<title>By: tgoyer</title>
		<link>http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/#comment-778900</link>
		<dc:creator>tgoyer</dc:creator>
		<pubDate>Tue, 12 Aug 2008 23:34:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2684#comment-778900</guid>
		<description>&lt;blockquote&gt;the event bubbles up from the originating element to the top of the DOM tree&lt;/blockquote&gt;

My understanding is that the bubbling occurs only up to the element where the event is handled.  Only if there are no event handlers for that event type does it bubble to the top.

Am I mistaken?</description>
		<content:encoded><![CDATA[<blockquote><p>the event bubbles up from the originating element to the top of the DOM tree</p></blockquote>
<p>My understanding is that the bubbling occurs only up to the element where the event is handled.  Only if there are no event handlers for that event type does it bubble to the top.</p>
<p>Am I mistaken?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Rajakumar</title>
		<link>http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/#comment-772359</link>
		<dc:creator>Rajakumar</dc:creator>
		<pubDate>Fri, 01 Aug 2008 19:27:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2684#comment-772359</guid>
		<description>&lt;code&gt;well done .. The way you explored is really nice &lt;/code&gt;</description>
		<content:encoded><![CDATA[<code>well done .. The way you explored is really nice </code>]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Quadling</title>
		<link>http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/#comment-765995</link>
		<dc:creator>Richard Quadling</dc:creator>
		<pubDate>Wed, 23 Jul 2008 09:09:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2684#comment-765995</guid>
		<description>Another great use for Event Delegation is when you amend the document in realtime, say in response to user events or from AJAX data, etc.

Because you have to drop the events if you are going to drop the elements, event delegation allows you to attach the events to the container which gets the HTML or DOM updates. So now the container's contents can change as much as you like. And as long as you have some sort of standard to the naming of IDs (or whatever you want to use to identity the elements you want to watch the behaviour on), then you can have it all.

Nice article.

Richard Quadling.</description>
		<content:encoded><![CDATA[<p>Another great use for Event Delegation is when you amend the document in realtime, say in response to user events or from AJAX data, etc.</p>
<p>Because you have to drop the events if you are going to drop the elements, event delegation allows you to attach the events to the container which gets the HTML or DOM updates. So now the container&#8217;s contents can change as much as you like. And as long as you have some sort of standard to the naming of IDs (or whatever you want to use to identity the elements you want to watch the behaviour on), then you can have it all.</p>
<p>Nice article.</p>
<p>Richard Quadling.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ramius</title>
		<link>http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/#comment-765978</link>
		<dc:creator>Ramius</dc:creator>
		<pubDate>Wed, 23 Jul 2008 08:42:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2684#comment-765978</guid>
		<description>This is an excellent article/blog entry.  Thanks a lot and keep stuff like this coming!</description>
		<content:encoded><![CDATA[<p>This is an excellent article/blog entry.  Thanks a lot and keep stuff like this coming!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas</title>
		<link>http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/#comment-765914</link>
		<dc:creator>Andreas</dc:creator>
		<pubDate>Wed, 23 Jul 2008 06:57:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2684#comment-765914</guid>
		<description>PPK describes a way to get focus and blur delegation work in IE using focusin and focusout:

http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html</description>
		<content:encoded><![CDATA[<p>PPK describes a way to get focus and blur delegation work in IE using focusin and focusout:</p>
<p><a href="http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html" rel="nofollow">http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html</a></p>]]></content:encoded>
	</item>
	<item>
		<title>By: brothercake</title>
		<link>http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/#comment-765864</link>
		<dc:creator>brothercake</dc:creator>
		<pubDate>Wed, 23 Jul 2008 05:04:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=2684#comment-765864</guid>
		<description>mouseout doesn't have quirky behavior, it behaves exactly as it should; it only seems quirky because it doesn't fit our preconception of what it *should* mean (according to the capture behavior that we learnt as normal in the days of netscape 4!)

Here's a simpler way of adjusting the model:

&lt;code&gt;element.contains = function(node)
{
	if(node == this) { return true; }
	if(node == null) { return false; }
	else { return this.contains(node.parentNode); }
}&lt;/code&gt;

Which can be used to evaluate an event on any element, ie. &lt;code&gt;if(element.contains(e.target)) { ...&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>mouseout doesn&#8217;t have quirky behavior, it behaves exactly as it should; it only seems quirky because it doesn&#8217;t fit our preconception of what it *should* mean (according to the capture behavior that we learnt as normal in the days of netscape 4!)</p>
<p>Here&#8217;s a simpler way of adjusting the model:</p>
<code>element.contains = function(node)
{
	if(node == this) { return true; }
	if(node == null) { return false; }
	else { return this.contains(node.parentNode); }
}</code>
<p>Which can be used to evaluate an event on any element, ie. <code>if(element.contains(e.target)) { ...</code></p>]]></content:encoded>
	</item>
</channel>
</rss>
