<?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>
	<lastBuildDate>Wed, 09 May 2012 11:54:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Gabriel</title>
		<link>http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/comment-page-1/#comment-16042</link>
		<dc:creator>Gabriel</dc:creator>
		<pubDate>Tue, 06 Sep 2011 11:44:45 +0000</pubDate>
		<guid isPermaLink="false">http://think-robot.com/?p=187#comment-16042</guid>
		<description>In newer jQuery versions, you can use the &quot;proxy&quot; function which sets the context of &quot;this&quot; to an object of your choosing. See http://api.jquery.com/jQuery.proxy/</description>
		<content:encoded><![CDATA[<p>In newer jQuery versions, you can use the &#8220;proxy&#8221; function which sets the context of &#8220;this&#8221; to an object of your choosing. See <a href="http://api.jquery.com/jQuery.proxy/" rel="nofollow">http://api.jquery.com/jQuery.proxy/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ravi Pathak</title>
		<link>http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/comment-page-1/#comment-13123</link>
		<dc:creator>Ravi Pathak</dc:creator>
		<pubDate>Fri, 03 Jun 2011 13:48:18 +0000</pubDate>
		<guid isPermaLink="false">http://think-robot.com/?p=187#comment-13123</guid>
		<description>This is really cool. Does anyone know whether JQuery 1.6 has similar feature?</description>
		<content:encoded><![CDATA[<p>This is really cool. Does anyone know whether JQuery 1.6 has similar feature?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Re : Adding prototype function as an event handler - Jquery Home</title>
		<link>http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/comment-page-1/#comment-8023</link>
		<dc:creator>Re : Adding prototype function as an event handler - Jquery Home</dc:creator>
		<pubDate>Mon, 30 Aug 2010 09:48:58 +0000</pubDate>
		<guid isPermaLink="false">http://think-robot.com/?p=187#comment-8023</guid>
		<description>[...] Then I thankfully came upon the Hitch plugin as per this link: http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/. [...]</description>
		<content:encoded><![CDATA[<p>[...] Then I thankfully came upon the Hitch plugin as per this link: <a href="http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/" rel="nofollow">http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JQuery: object method as event handler &#171; Strange quark techblog</title>
		<link>http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/comment-page-1/#comment-7206</link>
		<dc:creator>JQuery: object method as event handler &#171; Strange quark techblog</dc:creator>
		<pubDate>Sun, 11 Apr 2010 21:10:22 +0000</pubDate>
		<guid isPermaLink="false">http://think-robot.com/?p=187#comment-7206</guid>
		<description>[...] Alternatively, you can use a plug-in function that allows you to explicitly specify the scope of the handler. Here is an example (originally from ThinkRobot: [...]</description>
		<content:encoded><![CDATA[<p>[...] Alternatively, you can use a plug-in function that allows you to explicitly specify the scope of the handler. Here is an example (originally from ThinkRobot: [...]</p>
]]></content:encoded>
	</item>
	<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&#039;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;
     $(&#039;#btnFoo&#039;).bind(&#039;click&#039;, function() {
          me.doOtherWork();
     });
};

this.doOtherWork = function()
{
     alert(&#039;worky&#039;);
};</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 />
     $(&#8216;#btnFoo&#8217;).bind(&#8216;click&#8217;, function() {<br />
          me.doOtherWork();<br />
     });<br />
};</p>
<p>this.doOtherWork = function()<br />
{<br />
     alert(&#8216;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 &quot;bind&quot;, which allows you to specify the event (&quot;click&quot;), extra data (obj), and the function to handle the event (obj.handleClick).  Your &quot;extra data&quot; is arbitrary and will be available inside your handler as e.data, so you can alert(e.data.message);

I didn&#039;t test this against your specific example, but it should look something like this:

    $(&#039;a&#039;).bind(&#039;click&#039;, 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 (&#8220;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>    $(&#8216;a&#8217;).bind(&#8216;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>

