<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Event Delegation, take 2</title>
	<atom:link href="http://www.clientcide.com/code-releases/event-delegation-take-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clientcide.com/code-releases/event-delegation-take-2/</link>
	<description>Making stuff work on the other side of the request.</description>
	<lastBuildDate>Wed, 21 Jul 2010 07:19:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Aaron N.</title>
		<link>http://www.clientcide.com/code-releases/event-delegation-take-2/comment-page-1/#comment-32195</link>
		<dc:creator>Aaron N.</dc:creator>
		<pubDate>Sat, 18 Apr 2009 04:13:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.clientcide.com/?p=669#comment-32195</guid>
		<description>I have stopped working on this plugin as MooTools 2.0 will contain this functionality. Anyone using this version will need to convert their selectors (the syntax is different in M2.0) when they upgrade. That&#039;s why it&#039;s still &quot;beta&quot; here.</description>
		<content:encoded><![CDATA[<p>I have stopped working on this plugin as MooTools 2.0 will contain this functionality. Anyone using this version will need to convert their selectors (the syntax is different in M2.0) when they upgrade. That&#8217;s why it&#8217;s still &#8220;beta&#8221; here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JTR</title>
		<link>http://www.clientcide.com/code-releases/event-delegation-take-2/comment-page-1/#comment-32194</link>
		<dc:creator>JTR</dc:creator>
		<pubDate>Sat, 18 Apr 2009 03:19:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.clientcide.com/?p=669#comment-32194</guid>
		<description>Aaron, have you progressed any further with the custom event handling? i.e. mouseenter/mouseleave.

I happen to use those events and noticed that they don&#039;t work using thi plugin - as you&#039;ve highlighted.

It wont stop me doing what I want to do as I will just leave the old code in there - but it would be a nice to have.</description>
		<content:encoded><![CDATA[<p>Aaron, have you progressed any further with the custom event handling? i.e. mouseenter/mouseleave.</p>
<p>I happen to use those events and noticed that they don&#8217;t work using thi plugin &#8211; as you&#8217;ve highlighted.</p>
<p>It wont stop me doing what I want to do as I will just leave the old code in there &#8211; but it would be a nice to have.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron N.</title>
		<link>http://www.clientcide.com/code-releases/event-delegation-take-2/comment-page-1/#comment-32193</link>
		<dc:creator>Aaron N.</dc:creator>
		<pubDate>Fri, 17 Apr 2009 17:08:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.clientcide.com/?p=669#comment-32193</guid>
		<description>Nice work JTR. You&#039;ve definitely got the idea. Note that MooTools 2.0 is coming along and aiming for a summer release and the delegation system in it does indeed have a different format. I strongly suggest leaving some sort of note in a comment in your code whenever you use this so you can find it and switch it out later (as it&#039;s not something you can easily search for). The basic mechanism will remain the same, but the syntax of the selector has changed.</description>
		<content:encoded><![CDATA[<p>Nice work JTR. You&#8217;ve definitely got the idea. Note that MooTools 2.0 is coming along and aiming for a summer release and the delegation system in it does indeed have a different format. I strongly suggest leaving some sort of note in a comment in your code whenever you use this so you can find it and switch it out later (as it&#8217;s not something you can easily search for). The basic mechanism will remain the same, but the syntax of the selector has changed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JTR</title>
		<link>http://www.clientcide.com/code-releases/event-delegation-take-2/comment-page-1/#comment-32192</link>
		<dc:creator>JTR</dc:creator>
		<pubDate>Fri, 17 Apr 2009 16:59:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.clientcide.com/?p=669#comment-32192</guid>
		<description>Aaron,
In regard to post 20 (above), I have found that the error occurs when you use element.removeEvents();

removeEvents works when you specify the event, such as element.removeEvents(&#039;click&#039;); but if you want to remove ALL events the error appears.</description>
		<content:encoded><![CDATA[<p>Aaron,<br />
In regard to post 20 (above), I have found that the error occurs when you use element.removeEvents();</p>
<p>removeEvents works when you specify the event, such as element.removeEvents(&#8216;click&#8217;); but if you want to remove ALL events the error appears.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JTR</title>
		<link>http://www.clientcide.com/code-releases/event-delegation-take-2/comment-page-1/#comment-32191</link>
		<dc:creator>JTR</dc:creator>
		<pubDate>Fri, 17 Apr 2009 16:08:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.clientcide.com/?p=669#comment-32191</guid>
		<description>Great plugin!

Im writing a multi-resource calendar system (that utilizes Mootools 1.2) for a client.  I use the ContextMenu class to give the user a right-click menu.  Using the standard ContextMenu code it associates a function to the &#039;contextmenu&#039; event.  The event is added to each element that you specify (it uses $$(element) to achieve this). 

 In my code I am using a table to display my calendar and the table can contain upto 2000 cells which I need to assign the event to.  After getting everything to work.. I then stumbled across this plugin.

I have modified the ContextMenu class to use delegation.  My parent element becomes the table and the children are the cells (td).  My event assignment time has gone from 1 second to instant - as I now add 1 event to the table and not to ~2000 cells.  I know it doesnt sound like a great improvement but the 1 second delay was noticable.

BTW: The element where the event occurs is obtained by grabbing the events target, for example:

parent.addEvent(&#039;click(td)&#039;, function(e) {
    targetEl = e.target;
    targetEl.setStyle(&#039;background-color&#039;, &#039;#CCCCCC&#039;);
});

Thanks again! I hope to see delegation in Mootools 1.3</description>
		<content:encoded><![CDATA[<p>Great plugin!</p>
<p>Im writing a multi-resource calendar system (that utilizes Mootools 1.2) for a client.  I use the ContextMenu class to give the user a right-click menu.  Using the standard ContextMenu code it associates a function to the &#8216;contextmenu&#8217; event.  The event is added to each element that you specify (it uses $$(element) to achieve this). </p>
<p> In my code I am using a table to display my calendar and the table can contain upto 2000 cells which I need to assign the event to.  After getting everything to work.. I then stumbled across this plugin.</p>
<p>I have modified the ContextMenu class to use delegation.  My parent element becomes the table and the children are the cells (td).  My event assignment time has gone from 1 second to instant &#8211; as I now add 1 event to the table and not to ~2000 cells.  I know it doesnt sound like a great improvement but the 1 second delay was noticable.</p>
<p>BTW: The element where the event occurs is obtained by grabbing the events target, for example:</p>
<p>parent.addEvent(&#8216;click(td)&#8217;, function(e) {<br />
    targetEl = e.target;<br />
    targetEl.setStyle(&#8216;background-color&#8217;, &#8216;#CCCCCC&#8217;);<br />
});</p>
<p>Thanks again! I hope to see delegation in Mootools 1.3</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jQuery implineste 3 ani si lanseaza versiunea 1.3 &#124; Interfete Web</title>
		<link>http://www.clientcide.com/code-releases/event-delegation-take-2/comment-page-1/#comment-31738</link>
		<dc:creator>jQuery implineste 3 ani si lanseaza versiunea 1.3 &#124; Interfete Web</dc:creator>
		<pubDate>Mon, 19 Jan 2009 10:52:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.clientcide.com/?p=669#comment-31738</guid>
		<description>[...] Personal, nu am avut timp sa incerc practic ce aduce nou aceasta versiune, insa am aruncat o privire pe pagina in care este anuntata oficial noua versiune, si pot spune ca mi s-au parut interesante castigurile de performanta datorate motorului de selectori Sizzle (daca aruncati o privire pe graficele din articol o sa vedeti ca sunt cu adevarat semnificative in cazul Internet Explorer 6/7, pentru restul browserelor diferentele de performanta fiind destul de mici), si noile evenimente &#8220;live&#8221; (utile in special in cazul in care se creaza elemente DOM dupa ce s-a incarcat pagina, elemente la care e nevoie sa atasam ascultatori - chiar exista astfel de pagini, luati ca exemplu activitatea lui Robert Scoble si a prietenilor sai contactelor sale de pe Friendfeed, vazuta in timp real) realizate cu ajutorul delegarii de evenimente (ca o paranteza, si viitoarea versiune de MooTools va avea parte de asa ceva). [...]</description>
		<content:encoded><![CDATA[<p>[...] Personal, nu am avut timp sa incerc practic ce aduce nou aceasta versiune, insa am aruncat o privire pe pagina in care este anuntata oficial noua versiune, si pot spune ca mi s-au parut interesante castigurile de performanta datorate motorului de selectori Sizzle (daca aruncati o privire pe graficele din articol o sa vedeti ca sunt cu adevarat semnificative in cazul Internet Explorer 6/7, pentru restul browserelor diferentele de performanta fiind destul de mici), si noile evenimente &#8220;live&#8221; (utile in special in cazul in care se creaza elemente DOM dupa ce s-a incarcat pagina, elemente la care e nevoie sa atasam ascultatori &#8211; chiar exista astfel de pagini, luati ca exemplu activitatea lui Robert Scoble si a prietenilor sai contactelor sale de pe Friendfeed, vazuta in timp real) realizate cu ajutorul delegarii de evenimente (ca o paranteza, si viitoarea versiune de MooTools va avea parte de asa ceva). [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron N.</title>
		<link>http://www.clientcide.com/code-releases/event-delegation-take-2/comment-page-1/#comment-31704</link>
		<dc:creator>Aaron N.</dc:creator>
		<pubDate>Tue, 13 Jan 2009 16:26:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.clientcide.com/?p=669#comment-31704</guid>
		<description>Hmmm. In what context? Is this on the demo page? Can you post a url that I can look at?</description>
		<content:encoded><![CDATA[<p>Hmmm. In what context? Is this on the demo page? Can you post a url that I can look at?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: emailtoid.net/i/ac6706df/</title>
		<link>http://www.clientcide.com/code-releases/event-delegation-take-2/comment-page-1/#comment-31703</link>
		<dc:creator>emailtoid.net/i/ac6706df/</dc:creator>
		<pubDate>Tue, 13 Jan 2009 14:56:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.clientcide.com/?p=669#comment-31703</guid>
		<description>Am I missing something? I get this error in the code, I think I need some Module cause this is with MT1.2 complete.
 
events[type].contains is not a function
[Break on this error] if (!events[type] &#124;&#124; (fn &amp;&amp; !events[type].contains(fn))) return this;</description>
		<content:encoded><![CDATA[<p>Am I missing something? I get this error in the code, I think I need some Module cause this is with MT1.2 complete.</p>
<p>events[type].contains is not a function<br />
[Break on this error] if (!events[type] || (fn &amp;&amp; !events[type].contains(fn))) return this;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron N.</title>
		<link>http://www.clientcide.com/code-releases/event-delegation-take-2/comment-page-1/#comment-31701</link>
		<dc:creator>Aaron N.</dc:creator>
		<pubDate>Fri, 09 Jan 2009 21:32:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.clientcide.com/?p=669#comment-31701</guid>
		<description>Published.

Regarding custom events (like mouseenter) I have an idea how to do this so that not only will mouseenter/mouseleave work but so that people can write their own custom rules for delegation. In the case of mouseenter/leave the wrapper function has to check that the target == the selector, and not look for children. Other custom events might have different rules. I&#039;ll try and tackle shortly.</description>
		<content:encoded><![CDATA[<p>Published.</p>
<p>Regarding custom events (like mouseenter) I have an idea how to do this so that not only will mouseenter/mouseleave work but so that people can write their own custom rules for delegation. In the case of mouseenter/leave the wrapper function has to check that the target == the selector, and not look for children. Other custom events might have different rules. I&#8217;ll try and tackle shortly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jens Anders Bakke</title>
		<link>http://www.clientcide.com/code-releases/event-delegation-take-2/comment-page-1/#comment-31699</link>
		<dc:creator>Jens Anders Bakke</dc:creator>
		<pubDate>Fri, 09 Jan 2009 20:43:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.clientcide.com/?p=669#comment-31699</guid>
		<description>Excellent :) Glad I could help make the class work as intended.
Now the only thing left is to get mouseenter and mouseleave to work, and I&#039;ll be truly satisfied :)

btw, I improved the double replace code into one regex replace as well..

selector: type.replace(/^.*?\((.*)\)$/,&quot;$1&quot;)

Example can be found here:
http://webfreak.no/lab/moo/event.delegation/take2.htm</description>
		<content:encoded><![CDATA[<p>Excellent :) Glad I could help make the class work as intended.<br />
Now the only thing left is to get mouseenter and mouseleave to work, and I&#8217;ll be truly satisfied :)</p>
<p>btw, I improved the double replace code into one regex replace as well..</p>
<p>selector: type.replace(/^.*?\((.*)\)$/,&#8221;$1&#8243;)</p>
<p>Example can be found here:<br />
<a href="http://webfreak.no/lab/moo/event.delegation/take2.htm" rel="nofollow">http://webfreak.no/lab/moo/event.delegation/take2.htm</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
