<?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>MyFunnyDev &#187; Javascript</title>
	<atom:link href="http://michalkuklis.com/blog/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://michalkuklis.com/blog</link>
	<description>web, coding and beyond</description>
	<lastBuildDate>Fri, 25 Jun 2010 05:51:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>changing function&#8217;s context in javascript</title>
		<link>http://michalkuklis.com/blog/2009/10/31/changing-functions-context-in-javascript/</link>
		<comments>http://michalkuklis.com/blog/2009/10/31/changing-functions-context-in-javascript/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 04:24:23 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=243</guid>
		<description><![CDATA[Today I learned how to change the context of a function in javascript. When we do:

function test&#40;&#41; &#123;
  this.foo = &#34;Hello from &#34; + this + &#34; context.&#34;;
&#125;
test&#40;&#41;;
alert&#40;foo&#41;; // will show &#34;Hello from [object Window] context.&#34;;

foo will belong to the global context. In other words global object foo will be created. We can change [...]]]></description>
			<content:encoded><![CDATA[<p>Today I learned how to change the context of a function in javascript. When we do:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> test<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">foo</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Hello from &quot;</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; context.&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
test<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>foo<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// will show &quot;Hello from [object Window] context.&quot;;</span></pre></div></div>

<p>foo will belong to the global context. In other words global object foo will be created. We can change the context to some other object by doing:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> otherContext <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
test.<span style="color: #660066;">call</span><span style="color: #009900;">&#40;</span>otherContext<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>otherContext.<span style="color: #660066;">foo</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// will show &quot;Hello from [object Object] context.&quot;</span></pre></div></div>

<p>In this case foo will belong to otherContext.</p>
]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2009/10/31/changing-functions-context-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JQuery 1.3</title>
		<link>http://michalkuklis.com/blog/2009/01/15/jquery-13/</link>
		<comments>http://michalkuklis.com/blog/2009/01/15/jquery-13/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 03:51:00 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=112</guid>
		<description><![CDATA[New release contains new selector engine called Sizzle (the fastest css selector out there) and  live events (which work similar to the live query plugin). 
More details can be found here
]]></description>
			<content:encoded><![CDATA[<p>New release contains new selector engine called Sizzle (the fastest css selector out there) and  live events (which work similar to the <a href="http://michalkuklis.com/blog/?p=30">live query plugin</a>). </p>
<p>More details can be found <a href="http://docs.jquery.com/Release:jQuery_1.3">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2009/01/15/jquery-13/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Peppy fast css3 selector engine</title>
		<link>http://michalkuklis.com/blog/2008/10/28/peppy-fast-css3-selector-engine/</link>
		<comments>http://michalkuklis.com/blog/2008/10/28/peppy-fast-css3-selector-engine/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 02:41:48 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=68</guid>
		<description><![CDATA[Peppy  is a small and very fast css3 selector written by James Donaghue. Here is how you can use it:

var selector = &#34;div&#34;;
var context = &#34;#elementId&#34;;
var q = peppy.query&#40;selector, context&#41;;

]]></description>
			<content:encoded><![CDATA[<p><a href="http://jamesdonaghue.com/static/peppy/">Peppy </a> is a small and very fast css3 selector written by James Donaghue. Here is how you can use it:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> selector <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;div&quot;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> context <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;#elementId&quot;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> q <span style="color: #339933;">=</span> peppy.<span style="color: #660066;">query</span><span style="color: #009900;">&#40;</span>selector<span style="color: #339933;">,</span> context<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2008/10/28/peppy-fast-css3-selector-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript closures</title>
		<link>http://michalkuklis.com/blog/2008/09/16/javascript-closures/</link>
		<comments>http://michalkuklis.com/blog/2008/09/16/javascript-closures/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 02:30:25 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=38</guid>
		<description><![CDATA[Nice presentation about JavaScript closures posted by Stuart Langridge
]]></description>
			<content:encoded><![CDATA[<p>Nice presentation about <a title="JavaScript closures" href="http://www.kryogenix.org/code/browser/secrets-of-javascript-closures/">JavaScript closures</a> posted by Stuart Langridge</p>
]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2008/09/16/javascript-closures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Live Query plugin for jquery</title>
		<link>http://michalkuklis.com/blog/2007/12/16/30/</link>
		<comments>http://michalkuklis.com/blog/2007/12/16/30/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 21:12:27 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=30</guid>
		<description><![CDATA[It&#8217;s annoying to rebind events to their targets after Ajax request. You can read more about it here.
In order to fix it you can use  Live Query plugin.
Instead of doing:



$('a').click(dosomething);
$('#htmlElement').load('server.php',function() {
  $('a').click(dosomething);
});



you can now do:



$('a').livequery('click',dosomething);
$('#htmlElement').load('server.php');



]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s annoying to rebind events to their targets after Ajax request. You can read more about it <a href="http://docs.jquery.com/Tutorials:AJAX_and_Events" title="jquery events">here</a>.</p>
<p>In order to fix it you can use  <a href="http://plugins.jquery.com/project/livequery/" title="live query plugin">Live Query plugin</a>.</p>
<p>Instead of doing:</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript">
$('a').click(dosomething);
$('#htmlElement').load('server.php',function() {
  $('a').click(dosomething);
});
</pre>
</div>
</div>
<p>you can now do:</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript">
$('a').livequery('click',dosomething);
$('#htmlElement').load('server.php');
</pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2007/12/16/30/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>javascript essentials</title>
		<link>http://michalkuklis.com/blog/2007/01/14/javascript-essentials/</link>
		<comments>http://michalkuklis.com/blog/2007/01/14/javascript-essentials/#comments</comments>
		<pubDate>Mon, 15 Jan 2007 01:40:41 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/archives/20</guid>
		<description><![CDATA[Dan Webb posted his list of useful javascript pieces. I have to admit that $(), event handler and getting elements by class name makes your life easier. I would add JQuery to this list, especially when you have some bigger project in mind.
]]></description>
			<content:encoded><![CDATA[<p><a title="js essentials" href="http://www.danwebb.net/2007/1/10/scripting-essentials">Dan Webb</a> posted his <a href="http://www.danwebb.net/2007/1/10/scripting-essentials">list of useful javascript pieces</a>. I have to admit that $(), event handler and getting elements by class name makes your life easier. I would add <a href="http://jquery.com/">JQuery</a> to this list, especially when you have some bigger project in mind.</p>
]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2007/01/14/javascript-essentials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JQuery</title>
		<link>http://michalkuklis.com/blog/2006/10/03/jquery/</link>
		<comments>http://michalkuklis.com/blog/2006/10/03/jquery/#comments</comments>
		<pubDate>Tue, 03 Oct 2006 19:51:04 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/archives/19</guid>
		<description><![CDATA[Have you had a chance to play with JQuery? You can find it here. There is growing number of plugins here. Great job guys!
]]></description>
			<content:encoded><![CDATA[<p>Have you had a chance to play with JQuery? You can find it <a href="http://jquery.com">here</a>. There is growing number of plugins <a href="http://interface.eyecon.ro/plugins">here</a>. Great job guys!</p>
]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2006/10/03/jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
