<?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: Function&#8217;less event handlers in jQuery</title>
	<atom:link href="http://james.padolsey.com/javascript/functionless-event-handlers-in-jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://james.padolsey.com/javascript/functionless-event-handlers-in-jquery/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 08 Mar 2010 01:21:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: James</title>
		<link>http://james.padolsey.com/javascript/functionless-event-handlers-in-jquery/comment-page-1/#comment-11384</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 08 May 2009 08:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=792#comment-11384</guid>
		<description>@&lt;a href=&quot;#comment-11329&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Benson Wong&lt;/strong&gt;&lt;/a&gt;, yes, this is a shortcut; no extra functionality is available. The point in the extension is to simplify the process of adding primitive event handlers. Like everything, the effectiveness of the extension is subjective - I for one do see the benefits and I think it improves readability and rids the code of unnecessary bloat.

@&lt;a href=&quot;#comment-11342&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Paul&lt;/strong&gt;&lt;/a&gt;, I know what you mean and I feel the same way while using it; I like having low-level control, especially when it comes to callbacks. The extension is just additional layer of simplicity for those who want it.

@&lt;a href=&quot;#comment-11352&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Balazs&lt;/strong&gt;&lt;/a&gt;, Thanks for your comment. I think adding any more functionality (like specifying execution order with arrays) would pretty much dispel the need for the extension in the first place; if someone needs to use &#039;find&#039; or other methods of that type then they should definitely stick to using a callback function. Btw, that upcoming change looks promising; definitely a useful addition!

@&lt;a href=&quot;#comment-11355&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Marko Simic&lt;/strong&gt;&lt;/a&gt;, maybe you could expand your argument?</description>
		<content:encoded><![CDATA[<p>@<a href="#comment-11329"><strong>Benson Wong</strong></a>, yes, this is a shortcut; no extra functionality is available. The point in the extension is to simplify the process of adding primitive event handlers. Like everything, the effectiveness of the extension is subjective &#8211; I for one do see the benefits and I think it improves readability and rids the code of unnecessary bloat.</p>
<p>@<a href="#comment-11342"><strong>Paul</strong></a>, I know what you mean and I feel the same way while using it; I like having low-level control, especially when it comes to callbacks. The extension is just additional layer of simplicity for those who want it.</p>
<p>@<a href="#comment-11352"><strong>Balazs</strong></a>, Thanks for your comment. I think adding any more functionality (like specifying execution order with arrays) would pretty much dispel the need for the extension in the first place; if someone needs to use &#8216;find&#8217; or other methods of that type then they should definitely stick to using a callback function. Btw, that upcoming change looks promising; definitely a useful addition!</p>
<p>@<a href="#comment-11355"><strong>Marko Simic</strong></a>, maybe you could expand your argument?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko Simic</title>
		<link>http://james.padolsey.com/javascript/functionless-event-handlers-in-jquery/comment-page-1/#comment-11355</link>
		<dc:creator>Marko Simic</dc:creator>
		<pubDate>Thu, 07 May 2009 22:53:17 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=792#comment-11355</guid>
		<description>This smells on Perl. 
I am in Perl last few days and main problem is its dirtiness.
Anyway this is &quot;nice to know&quot;, but I would not recommend anyone to use this.</description>
		<content:encoded><![CDATA[<p>This smells on Perl.<br />
I am in Perl last few days and main problem is its dirtiness.<br />
Anyway this is &#8220;nice to know&#8221;, but I would not recommend anyone to use this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Balazs Endresz</title>
		<link>http://james.padolsey.com/javascript/functionless-event-handlers-in-jquery/comment-page-1/#comment-11352</link>
		<dc:creator>Balazs Endresz</dc:creator>
		<pubDate>Thu, 07 May 2009 22:10:01 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=792#comment-11352</guid>
		<description>I just can&#039;t keep starring your posts lately, this is really great!

After a bit digging I&#039;ve found the original discussion where this thing came up, there were some other interesting solutions for this: 
http://groups.google.com/group/jquery-dev/msg/727536a1f11c5921
http://groups.google.com/group/jquery-dev/msg/6611968e3dfde574
http://groups.google.com/group/jquery-dev/msg/c0a13ce5067ab784

But I think yours pretty much beats beats them, the only problem I think is that you can&#039;t specify the order of execution of the commands, so you can&#039;t use `find` or anything that relies on it. A simple solution would be if you could (optionally) wrap the objects in an array, though it might be a bit overkill.

And watch out for the next release as it looks like there will be some important changes in the event handling code: http://dev.jquery.com/changeset/6344</description>
		<content:encoded><![CDATA[<p>I just can&#8217;t keep starring your posts lately, this is really great!</p>
<p>After a bit digging I&#8217;ve found the original discussion where this thing came up, there were some other interesting solutions for this:<br />
<a href="http://groups.google.com/group/jquery-dev/msg/727536a1f11c5921">http://groups.google.com/group/jquery-dev/msg/727536a1f11c5921</a><br />
<a href="http://groups.google.com/group/jquery-dev/msg/6611968e3dfde574">http://groups.google.com/group/jquery-dev/msg/6611968e3dfde574</a><br />
<a href="http://groups.google.com/group/jquery-dev/msg/c0a13ce5067ab784">http://groups.google.com/group/jquery-dev/msg/c0a13ce5067ab784</a></p>
<p>But I think yours pretty much beats beats them, the only problem I think is that you can&#8217;t specify the order of execution of the commands, so you can&#8217;t use `find` or anything that relies on it. A simple solution would be if you could (optionally) wrap the objects in an array, though it might be a bit overkill.</p>
<p>And watch out for the next release as it looks like there will be some important changes in the event handling code: <a href="http://dev.jquery.com/changeset/6344">http://dev.jquery.com/changeset/6344</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: losted</title>
		<link>http://james.padolsey.com/javascript/functionless-event-handlers-in-jquery/comment-page-1/#comment-11345</link>
		<dc:creator>losted</dc:creator>
		<pubDate>Thu, 07 May 2009 19:00:09 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=792#comment-11345</guid>
		<description>I Hope this will be implemented in some kind of way in future release of JQuery. Good work James!</description>
		<content:encoded><![CDATA[<p>I Hope this will be implemented in some kind of way in future release of JQuery. Good work James!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://james.padolsey.com/javascript/functionless-event-handlers-in-jquery/comment-page-1/#comment-11342</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Thu, 07 May 2009 18:37:02 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=792#comment-11342</guid>
		<description>Really nice concept. There are many cases which this would be useful. I&#039;d like to see this implemented along with the current event functions.

My only reservation is that it feels like it breaks some of the basic concepts of jQuery. On of the big rules is that you don&#039;t pass functions to be called in as strings. But since this rule is broken for event type, maybe this would just work along side it.

Keep up the great work!</description>
		<content:encoded><![CDATA[<p>Really nice concept. There are many cases which this would be useful. I&#8217;d like to see this implemented along with the current event functions.</p>
<p>My only reservation is that it feels like it breaks some of the basic concepts of jQuery. On of the big rules is that you don&#8217;t pass functions to be called in as strings. But since this rule is broken for event type, maybe this would just work along side it.</p>
<p>Keep up the great work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ignite</title>
		<link>http://james.padolsey.com/javascript/functionless-event-handlers-in-jquery/comment-page-1/#comment-11333</link>
		<dc:creator>ignite</dc:creator>
		<pubDate>Thu, 07 May 2009 16:13:05 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=792#comment-11333</guid>
		<description>Very interesting post. I hadn&#039;t seen the &quot;ultra chaining&quot; discussion and I agree with the issues you&#039;ve pointed out. I think you&#039;re alternative method is pretty darn sweet. I like the fact that if you want to pass the typical callback function you can. Your method certainly cleans up the code a bit and makes it more structured, which is awesome.</description>
		<content:encoded><![CDATA[<p>Very interesting post. I hadn&#8217;t seen the &#8220;ultra chaining&#8221; discussion and I agree with the issues you&#8217;ve pointed out. I think you&#8217;re alternative method is pretty darn sweet. I like the fact that if you want to pass the typical callback function you can. Your method certainly cleans up the code a bit and makes it more structured, which is awesome.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JDStraughan</title>
		<link>http://james.padolsey.com/javascript/functionless-event-handlers-in-jquery/comment-page-1/#comment-11331</link>
		<dc:creator>JDStraughan</dc:creator>
		<pubDate>Thu, 07 May 2009 15:53:43 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=792#comment-11331</guid>
		<description>This is great.  Added to tutlist.com</description>
		<content:encoded><![CDATA[<p>This is great.  Added to tutlist.com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benson Wong</title>
		<link>http://james.padolsey.com/javascript/functionless-event-handlers-in-jquery/comment-page-1/#comment-11329</link>
		<dc:creator>Benson Wong</dc:creator>
		<pubDate>Thu, 07 May 2009 15:10:51 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=792#comment-11329</guid>
		<description>I&#039;ve only been using jQuery for about 4 months, and mostly only on my twitter project, tweetlens.com. So I&#039;m not really a JS pro (yet) :) 

Anyways, I looked through your JS code a bit, this is really just short cut on top regular jQuery and passing anonymous functions. 

So this: 

&lt;pre lang=&quot;javascript&quot;&gt;
$(&#039;a&#039;).bind(&#039;click.namespace&#039;, {
    addClass: &#039;clicked&#039;,
    animate: [{fontSize: &#039;+=2px&#039;}, 300]
});
&lt;/pre&gt;

instead of: 

&lt;pre lang=&quot;javascript&quot;&gt;
$(&#039;a&#039;).bind(&#039;click.namespace&#039;,function(e) {
$(this).addClass(&#039;clicked&#039;).animate({fontsize:&#039;+=2px&#039;},300)});
&lt;/pre&gt;

I don&#039;t really see the advantages, readability isn&#039;t even really that improved. IMHO.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve only been using jQuery for about 4 months, and mostly only on my twitter project, tweetlens.com. So I&#8217;m not really a JS pro (yet) <img src='http://james.padolsey.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>Anyways, I looked through your JS code a bit, this is really just short cut on top regular jQuery and passing anonymous functions. </p>
<p>So this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span class="br0">&#40;</span><span class="st0">'a'</span><span class="br0">&#41;</span>.<span class="me1">bind</span><span class="br0">&#40;</span><span class="st0">'click.namespace'</span><span class="sy0">,</span> <span class="br0">&#123;</span>
    addClass<span class="sy0">:</span> <span class="st0">'clicked'</span><span class="sy0">,</span>
    animate<span class="sy0">:</span> <span class="br0">&#91;</span><span class="br0">&#123;</span>fontSize<span class="sy0">:</span> <span class="st0">'+=2px'</span><span class="br0">&#125;</span><span class="sy0">,</span> <span class="nu0">300</span><span class="br0">&#93;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

<p>instead of:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span class="br0">&#40;</span><span class="st0">'a'</span><span class="br0">&#41;</span>.<span class="me1">bind</span><span class="br0">&#40;</span><span class="st0">'click.namespace'</span><span class="sy0">,</span><span class="kw2">function</span><span class="br0">&#40;</span>e<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">addClass</span><span class="br0">&#40;</span><span class="st0">'clicked'</span><span class="br0">&#41;</span>.<span class="me1">animate</span><span class="br0">&#40;</span><span class="br0">&#123;</span>fontsize<span class="sy0">:</span><span class="st0">'+=2px'</span><span class="br0">&#125;</span><span class="sy0">,</span><span class="nu0">300</span><span class="br0">&#41;</span><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

<p>I don&#8217;t really see the advantages, readability isn&#8217;t even really that improved. IMHO.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
