<?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: Hitch. Object-oriented event handlers with jQuery</title>
	<atom:link href="http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/</link>
	<description>Design &#38; Development Blog</description>
	<pubDate>Wed, 10 Mar 2010 09:12:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: David Schreiber</title>
		<link>http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/comment-page-1/#comment-6050</link>
		<dc:creator>David Schreiber</dc:creator>
		<pubDate>Wed, 25 Nov 2009 15:05:31 +0000</pubDate>
		<guid isPermaLink="false">http://think-robot.com/?p=187#comment-6050</guid>
		<description>Suuuuuuper ! :-) That's the tool I need at the moment! Wohoo :-)</description>
		<content:encoded><![CDATA[<p>Suuuuuuper ! <img src='http://think-robot.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> That&#8217;s the tool I need at the moment! Wohoo <img src='http://think-robot.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dan</title>
		<link>http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/comment-page-1/#comment-5135</link>
		<dc:creator>dan</dc:creator>
		<pubDate>Tue, 04 Aug 2009 22:27:40 +0000</pubDate>
		<guid isPermaLink="false">http://think-robot.com/?p=187#comment-5135</guid>
		<description>this also works..

... assume the methods below are contained within a class

this.doWork = function()
{
     var me = this;
     $('#btnFoo').bind('click', function() {
          me.doOtherWork();
     });
};

this.doOtherWork = function()
{
     alert('worky');
};</description>
		<content:encoded><![CDATA[<p>this also works..</p>
<p>&#8230; assume the methods below are contained within a class</p>
<p>this.doWork = function()<br />
{<br />
     var me = this;<br />
     $(&#8217;#btnFoo&#8217;).bind(&#8217;click&#8217;, function() {<br />
          me.doOtherWork();<br />
     });<br />
};</p>
<p>this.doOtherWork = function()<br />
{<br />
     alert(&#8217;worky&#8217;);<br />
};</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mslade</title>
		<link>http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/comment-page-1/#comment-4721</link>
		<dc:creator>mslade</dc:creator>
		<pubDate>Sat, 11 Jul 2009 20:02:36 +0000</pubDate>
		<guid isPermaLink="false">http://think-robot.com/?p=187#comment-4721</guid>
		<description>This is very useful.  As an alternative, you can achieve this using jQuery built-in "bind", which allows you to specify the event ("click"), extra data (obj), and the function to handle the event (obj.handleClick).  Your "extra data" is arbitrary and will be available inside your handler as e.data, so you can alert(e.data.message);

I didn't test this against your specific example, but it should look something like this:

    $('a').bind('click', obj, obj.handleClick);

See http://docs.jquery.com/Events/bind.</description>
		<content:encoded><![CDATA[<p>This is very useful.  As an alternative, you can achieve this using jQuery built-in &#8220;bind&#8221;, which allows you to specify the event (&#8221;click&#8221;), extra data (obj), and the function to handle the event (obj.handleClick).  Your &#8220;extra data&#8221; is arbitrary and will be available inside your handler as e.data, so you can alert(e.data.message);</p>
<p>I didn&#8217;t test this against your specific example, but it should look something like this:</p>
<p>    $(&#8217;a').bind(&#8217;click&#8217;, obj, obj.handleClick);</p>
<p>See <a href="http://docs.jquery.com/Events/bind" rel="nofollow">http://docs.jquery.com/Events/bind</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: agit8</title>
		<link>http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/comment-page-1/#comment-4335</link>
		<dc:creator>agit8</dc:creator>
		<pubDate>Mon, 29 Jun 2009 03:07:35 +0000</pubDate>
		<guid isPermaLink="false">http://think-robot.com/?p=187#comment-4335</guid>
		<description>Just what I was looking for! 

Super simple ; yet very useful. 

Hopefully this will be default behaviour of bind in the future.

-b</description>
		<content:encoded><![CDATA[<p>Just what I was looking for! </p>
<p>Super simple ; yet very useful. </p>
<p>Hopefully this will be default behaviour of bind in the future.</p>
<p>-b</p>
]]></content:encoded>
	</item>
</channel>
</rss>
