<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>t+1 - Latest Comments in Approaching jQuery popup callback hell</title><link>http://tplus1.disqus.com/</link><description></description><atom:link href="https://tplus1.disqus.com/approaching_popup_callback_hell/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 05 Feb 2010 20:53:05 -0000</lastBuildDate><item><title>Re: Approaching jQuery popup callback hell</title><link>http://blog.tplus1.com/blog/2009/08/31/approaching-popup-callback-hell/#comment-32803759</link><description>&lt;p&gt;Thanks a lot!I'll try it out.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Fri, 05 Feb 2010 20:53:05 -0000</pubDate></item><item><title>Re: Approaching jQuery popup callback hell</title><link>http://blog.tplus1.com/blog/2009/08/31/approaching-popup-callback-hell/#comment-32669800</link><description>&lt;p&gt;I was experiencing the same problem. I solved those problems by putting all anonymous functions used as callbacks in a namespace and now I'm only using the jQuery's bind function to work with events. Code like this:&lt;/p&gt;&lt;p&gt;$('#myButton').click(function(){ alert('I was clicked') })&lt;/p&gt;&lt;p&gt;was refactored to something like this:&lt;/p&gt;&lt;p&gt;$('#myButton').bind('click',{'self':this},myButtonClickHandler);&lt;/p&gt;&lt;p&gt;myButtonClickHandler = function(event)&lt;br&gt;{&lt;br&gt;    var self = event.data.self; //very useful if you work with namespaces&lt;br&gt;    alert('I was clicked')&lt;br&gt;}&lt;/p&gt;&lt;p&gt;You may think it is a little verbose than the first approach, but the second one is much more reusable and maintainable than the first one,&lt;/p&gt;&lt;p&gt;cheers!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Herberth Amaral</dc:creator><pubDate>Thu, 04 Feb 2010 18:43:42 -0000</pubDate></item><item><title>Re: Approaching jQuery popup callback hell</title><link>http://blog.tplus1.com/blog/2009/08/31/approaching-popup-callback-hell/#comment-17210235</link><description>&lt;p&gt;Hi!&lt;/p&gt;&lt;p&gt;Congratulations! Your readers have submitted and voted for your blog at The Daily Reviewer. We compiled an exclusive list of the Top 100 python Blogs, and we are glad to let you know that your blog was included! You can see it at &lt;a href="http://thedailyreviewer.com/top/python" rel="nofollow noopener" target="_blank" title="http://thedailyreviewer.com/top/python"&gt;http://thedailyreviewer.com...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;You can claim your Top 100 Blogs Award here : &lt;a href="http://thedailyreviewer.com/pages/badges/python" rel="nofollow noopener" target="_blank" title="http://thedailyreviewer.com/pages/badges/python"&gt;http://thedailyreviewer.com...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;P.S. This is a one-time notice to let you know your blog was included in one of our Top 100 Blog categories. You might get notices if you are listed in two or more categories.&lt;/p&gt;&lt;p&gt;P.P.S. If for some reason you want your blog removed from our list, just send an email to angelina@thedailyreviewer.com with the subject line "REMOVE" and the link to your blog in the body of the message.&lt;/p&gt;&lt;p&gt;Cheers!&lt;/p&gt;&lt;p&gt;Angelina Mizaki&lt;br&gt;Selection Committee President&lt;br&gt;The Daily Reviewer&lt;br&gt;&lt;a href="http://thedailyreviewer.com" rel="nofollow noopener" target="_blank" title="http://thedailyreviewer.com"&gt;http://thedailyreviewer.com&lt;/a&gt; &lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">The Daily Reviewer</dc:creator><pubDate>Wed, 23 Sep 2009 05:52:10 -0000</pubDate></item><item><title>Re: Approaching jQuery popup callback hell</title><link>http://blog.tplus1.com/blog/2009/08/31/approaching-popup-callback-hell/#comment-16932695</link><description>&lt;p&gt;I think you need to check it again. I have used it without any problem. Thank you for this post.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Designer Eyeglasses</dc:creator><pubDate>Sat, 19 Sep 2009 17:13:48 -0000</pubDate></item><item><title>Re: Approaching jQuery popup callback hell</title><link>http://blog.tplus1.com/blog/2009/08/31/approaching-popup-callback-hell/#comment-15687314</link><description>&lt;p&gt;Hi Mike,&lt;/p&gt;&lt;p&gt;Thanks for the feedback.  All my instincts say I should use a pubsub&lt;br&gt;system.  I was just hoping to hear from some other people that have&lt;br&gt;done this in JS that it does in fact work pretty well.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Mon, 31 Aug 2009 22:02:04 -0000</pubDate></item><item><title>Re: Approaching jQuery popup callback hell</title><link>http://blog.tplus1.com/blog/2009/08/31/approaching-popup-callback-hell/#comment-15686138</link><description>&lt;p&gt;I'm not very familiar with jQuery, but this feels like someplace that I would use something like Dojo's publish/subscribe setup, which is pretty much as you describe (party A publishes a signal, and all subscribed listeners are triggered).  It can make debugging more challenging as there's no direct link from the publisher to the subscriber, and can be easy to screw up the timing if you've got multiple listeners that might affect each other, but if you keep your head about you, it's a really convenient and elegant way to solve this kind of problem.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mike Pirnat</dc:creator><pubDate>Mon, 31 Aug 2009 21:31:50 -0000</pubDate></item></channel></rss>