<?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: JavaScript&#8217;s setTimeout and how to use it with your methods</title>
	<atom:link href="http://klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/feed/" rel="self" type="application/rss+xml" />
	<link>http://klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/</link>
	<description>Web developer and designer</description>
	<lastBuildDate>Wed, 23 Mar 2011 22:57:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: felix</title>
		<link>http://klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-5885</link>
		<dc:creator>felix</dc:creator>
		<pubDate>Wed, 23 Mar 2011 22:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-5885</guid>
		<description>Thanks man! i had some pain with that---</description>
		<content:encoded><![CDATA[<p>Thanks man! i had some pain with that&#8212;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: klevo</title>
		<link>http://klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-4457</link>
		<dc:creator>klevo</dc:creator>
		<pubDate>Sun, 20 Feb 2011 19:25:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-4457</guid>
		<description>Very cool, thanks!</description>
		<content:encoded><![CDATA[<p>Very cool, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denis BEURIVE</title>
		<link>http://klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-4449</link>
		<dc:creator>Denis BEURIVE</dc:creator>
		<pubDate>Sun, 20 Feb 2011 09:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-4449</guid>
		<description>I found a very elegant method on the following URL:

http://trephine.org/t/index.php?title=JavaScript_loop_closures

I uses &quot;loop closure&quot;.

For example :

		for (i=0; i&lt;$(this).length; i++)
		{
			var f = function(defElement)
			{
				var period = parseInt(defElement.attr(&#039;period&#039;));
				
				// On fait disparaître le conteneur de configuration.
				// On initialise les variables de contexte.
				// var configContainerName = &#039;trombino&#039; + i;
				defElement.css(&#039;display&#039;, &#039;none&#039;);
				defElement.attr(&#039;current&#039;, 0);
				
				window.setTimeout( function() { trombinoEventHandler(defElement, trombinoAttribut, period ); }, 50, &#039;JavaScript&#039;);
			};
			f($(this).eq(i))
		}

Regards,

Denis</description>
		<content:encoded><![CDATA[<p>I found a very elegant method on the following URL:</p>
<p><a href="http://trephine.org/t/index.php?title=JavaScript_loop_closures" rel="nofollow">http://trephine.org/t/index.php?title=JavaScript_loop_closures</a></p>
<p>I uses &#8220;loop closure&#8221;.</p>
<p>For example :</p>
<p>		for (i=0; i&lt;$(this).length; i++)<br />
		{<br />
			var f = function(defElement)<br />
			{<br />
				var period = parseInt(defElement.attr(&#039;period&#039;));</p>
<p>				// On fait disparaître le conteneur de configuration.<br />
				// On initialise les variables de contexte.<br />
				// var configContainerName = &#039;trombino&#039; + i;<br />
				defElement.css(&#039;display&#039;, &#039;none&#039;);<br />
				defElement.attr(&#039;current&#039;, 0);</p>
<p>				window.setTimeout( function() { trombinoEventHandler(defElement, trombinoAttribut, period ); }, 50, &#039;JavaScript&#039;);<br />
			};<br />
			f($(this).eq(i))<br />
		}</p>
<p>Regards,</p>
<p>Denis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Malli</title>
		<link>http://klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-751</link>
		<dc:creator>Malli</dc:creator>
		<pubDate>Wed, 13 Oct 2010 18:51:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-751</guid>
		<description>Very Helpful</description>
		<content:encoded><![CDATA[<p>Very Helpful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: svenmarley</title>
		<link>http://klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-93</link>
		<dc:creator>svenmarley</dc:creator>
		<pubDate>Wed, 14 Apr 2010 22:25:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-93</guid>
		<description>FF: 3.6.3
IE: 8.0

setTimeout( function() { return this.methodToCall.apply( this, arguments ); }, time );

Ugly formatting, but works in both.</description>
		<content:encoded><![CDATA[<p>FF: 3.6.3<br />
IE: 8.0</p>
<p>setTimeout( function() { return this.methodToCall.apply( this, arguments ); }, time );</p>
<p>Ugly formatting, but works in both.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eyedia</title>
		<link>http://klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-92</link>
		<dc:creator>Eyedia</dc:creator>
		<pubDate>Wed, 20 Jan 2010 13:00:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-92</guid>
		<description>Thanks! It really great and helpful.</description>
		<content:encoded><![CDATA[<p>Thanks! It really great and helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Иван</title>
		<link>http://klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-91</link>
		<dc:creator>Иван</dc:creator>
		<pubDate>Wed, 25 Nov 2009 09:56:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-91</guid>
		<description>Thank you very much about that solution!</description>
		<content:encoded><![CDATA[<p>Thank you very much about that solution!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eleman</title>
		<link>http://klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-90</link>
		<dc:creator>eleman</dc:creator>
		<pubDate>Thu, 29 Oct 2009 17:32:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-90</guid>
		<description>ok, it is solved thanks</description>
		<content:encoded><![CDATA[<p>ok, it is solved thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eleman</title>
		<link>http://klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-89</link>
		<dc:creator>eleman</dc:creator>
		<pubDate>Wed, 28 Oct 2009 21:27:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-89</guid>
		<description>hello,
i use;

function method(){
   if(document.getelementbyid(id)&lt;200){
      document.getelementbyid(id).style.left=document.getelementbyid(id).offsetLeft+10;//that line
      setTimeout(method(),1000);
   }
}

to see a slow slide effect.
but i just see my div on 200px right of the left edge of browser :S
where am i wrong?
should not it shows the effect of single &quot;that line&quot;?
thanks in advance</description>
		<content:encoded><![CDATA[<p>hello,<br />
i use;</p>
<p>function method(){<br />
   if(document.getelementbyid(id)&lt;200){<br />
      document.getelementbyid(id).style.left=document.getelementbyid(id).offsetLeft+10;//that line<br />
      setTimeout(method(),1000);<br />
   }<br />
}</p>
<p>to see a slow slide effect.<br />
but i just see my div on 200px right of the left edge of browser :S<br />
where am i wrong?<br />
should not it shows the effect of single &#8220;that line&#8221;?<br />
thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eero Anttila</title>
		<link>http://klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-88</link>
		<dc:creator>Eero Anttila</dc:creator>
		<pubDate>Thu, 17 Sep 2009 13:40:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-88</guid>
		<description>Here&#039;s a full solution:

function thisReferencingCallback(instance, method) {
	return function() {
		return method.apply(instance, arguments);
	}
}

setTimeout(thisReferencingCallback(this, someMethod), 50);</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a full solution:</p>
<p>function thisReferencingCallback(instance, method) {<br />
	return function() {<br />
		return method.apply(instance, arguments);<br />
	}<br />
}</p>
<p>setTimeout(thisReferencingCallback(this, someMethod), 50);</p>
]]></content:encoded>
	</item>
</channel>
</rss>

