<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Connecting the dots... &#187; &#8220;progressive enhancement&#8221;</title>
	<atom:link href="http://blog.rajatpandit.com/tag/progressive-enhancement/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rajatpandit.com</link>
	<description>Thoughts on Web Development, Scalability and Application Architecture</description>
	<lastBuildDate>Mon, 19 Jul 2010 12:46:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Custom Events in JQuery</title>
		<link>http://blog.rajatpandit.com/2009/07/08/custom-events-in-jquery/</link>
		<comments>http://blog.rajatpandit.com/2009/07/08/custom-events-in-jquery/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 10:36:05 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA["custom events"]]></category>
		<category><![CDATA["progressive enhancement"]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=272</guid>
		<description><![CDATA[Its barely been 1 week and I am already missing out the loveliness of YUI and have to work on JQuery, not saying its bad just missing out on the lack of verbosity that JQuery has to offer. I had to implement custom events on JQuery found this kind of working for what I needed [...]]]></description>
			<content:encoded><![CDATA[<p>Its barely been 1 week and I am already missing out the loveliness of <a href="http://developer.yahoo.com/yui">YUI</a> and have to work on <a href="http://jquery.com">JQuery</a>, not saying its bad just missing out on the lack of verbosity that <a href="http://jquery.com">JQuery</a> has to offer.</p>
<p>I had to implement custom events on <a href="http://jquery.com">JQuery</a> found this kind of working for what I needed it to do. Not so sure if this was the most ideal way to do it, but would be worth getting your views on it.</p>
<pre class="brush: jscript;">
$(document).ready(function() {
	$(document).bind('custom-event', doSomething);
	$(document).bind('custom-event', doAnotherthing);

	$('#some_name').click(function() {
		$(document).trigger('custom-event', ['foo1', 'foo2']);
	});

});

function doSomething(e, param1, param2) {
	console.log(arguments);
	console.log('doing something..');
}
function doAnotherthing(e, param1, param2)
{
	console.log(arguments);
	console.log('doing another thing..');
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/07/08/custom-events-in-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
