<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: JavaScript&#8217;s setTimeout and how to use it with your methods</title>
	<link>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/</link>
	<description>Freelance web developer</description>
	<pubDate>Wed, 10 Mar 2010 23:20:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Eyedia</title>
		<link>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-74383</link>
		<dc:creator>Eyedia</dc:creator>
		<pubDate>Wed, 20 Jan 2010 13:00:10 +0000</pubDate>
		<guid>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-74383</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://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-74245</link>
		<dc:creator>Иван</dc:creator>
		<pubDate>Wed, 25 Nov 2009 09:56:33 +0000</pubDate>
		<guid>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-74245</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://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-74178</link>
		<dc:creator>eleman</dc:creator>
		<pubDate>Thu, 29 Oct 2009 17:32:57 +0000</pubDate>
		<guid>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-74178</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://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-74155</link>
		<dc:creator>eleman</dc:creator>
		<pubDate>Wed, 28 Oct 2009 21:27:59 +0000</pubDate>
		<guid>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-74155</guid>
		<description>hello,
i use;

function method(){
   if(document.getelementbyid(id)&#60;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 "that line"?
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://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-73926</link>
		<dc:creator>Eero Anttila</dc:creator>
		<pubDate>Thu, 17 Sep 2009 13:40:12 +0000</pubDate>
		<guid>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-73926</guid>
		<description>Here'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>
	<item>
		<title>By: Zeder</title>
		<link>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-73470</link>
		<dc:creator>Zeder</dc:creator>
		<pubDate>Sat, 16 May 2009 12:50:04 +0000</pubDate>
		<guid>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-73470</guid>
		<description>What Chuck said. I was even able to omit the first line/step from his solution, leaving simply:

setTimeout(function() { this.MethodToCall(); }, time);

which worked for me in IE 8 but, alas, not in FF 3.0.10 (for which I had to revert to his original solution).</description>
		<content:encoded><![CDATA[<p>What Chuck said. I was even able to omit the first line/step from his solution, leaving simply:</p>
<p>setTimeout(function() { this.MethodToCall(); }, time);</p>
<p>which worked for me in IE 8 but, alas, not in FF 3.0.10 (for which I had to revert to his original solution).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeroen</title>
		<link>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-71987</link>
		<dc:creator>jeroen</dc:creator>
		<pubDate>Mon, 16 Mar 2009 19:29:22 +0000</pubDate>
		<guid>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-71987</guid>
		<description>Thanks!!
Very helpful!!</description>
		<content:encoded><![CDATA[<p>Thanks!!<br />
Very helpful!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bacter</title>
		<link>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-69360</link>
		<dc:creator>Bacter</dc:creator>
		<pubDate>Thu, 15 Jan 2009 21:39:45 +0000</pubDate>
		<guid>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-69360</guid>
		<description>Try this solution:
function animate( type, numb, _this ){
var toDelay = function() { animate( type, numb, _this ); };
    setTimeout( toDelay, flakes[numb].timeout );
}

link: http://lejnieks.com/2008/08/passing-arguments-to-javascripts-settimeout-method-using-closures/

works in IE and FF</description>
		<content:encoded><![CDATA[<p>Try this solution:<br />
function animate( type, numb, _this ){<br />
var toDelay = function() { animate( type, numb, _this ); };<br />
    setTimeout( toDelay, flakes[numb].timeout );<br />
}</p>
<p>link: <a href="http://lejnieks.com/2008/08/passing-arguments-to-javascripts-settimeout-method-using-closures/" rel="nofollow">http://lejnieks.com/2008/08/passing-arguments-to-javascripts-settimeout-method-using-closures/</a></p>
<p>works in IE and FF</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bacter</title>
		<link>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-69359</link>
		<dc:creator>Bacter</dc:creator>
		<pubDate>Thu, 15 Jan 2009 21:36:46 +0000</pubDate>
		<guid>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-69359</guid>
		<description>Try this solution:

var toDelay = function() { animate( type, numb, _this ); };
                setTimeout( toDelay, flakes[numb].timeout );</description>
		<content:encoded><![CDATA[<p>Try this solution:</p>
<p>var toDelay = function() { animate( type, numb, _this ); };<br />
                setTimeout( toDelay, flakes[numb].timeout );</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antibland</title>
		<link>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-69174</link>
		<dc:creator>Antibland</dc:creator>
		<pubDate>Tue, 30 Dec 2008 06:31:38 +0000</pubDate>
		<guid>http://www.klevo.sk/javascript/javascripts-settimeout-and-how-to-use-it-with-your-methods/#comment-69174</guid>
		<description>It's articles like this that make me help someone else.  From author to commenter: excellent job.</description>
		<content:encoded><![CDATA[<p>It&#8217;s articles like this that make me help someone else.  From author to commenter: excellent job.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
