<?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"
	>
<channel>
	<title>Comments on: JavaScript Color Fading Script</title>
	<atom:link href="http://www.leigeber.com/2008/05/javascript-color-fading-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leigeber.com/2008/05/javascript-color-fading-script/</link>
	<description>This web development blog features fresh articles on JavaScript, AJAX, CSS, XHTML, PHP, Photoshop and more.</description>
	<pubDate>Sat, 19 Jul 2008 21:48:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: roger  </title>
		<link>http://www.leigeber.com/2008/05/javascript-color-fading-script/#comment-5381</link>
		<dc:creator>roger  </dc:creator>
		<pubDate>Sat, 19 Jul 2008 12:17:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.leigeber.com/?p=36#comment-5381</guid>
		<description>he he ;) i love the simplicity of this and playing around with it amazing how disappearing links can bring a smile to your face ;) http://eti.me</description>
		<content:encoded><![CDATA[<p>he he <img src='http://www.leigeber.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> i love the simplicity of this and playing around with it amazing how disappearing links can bring a smile to your face <img src='http://www.leigeber.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <a href="http://eti.me" rel="nofollow">http://eti.me</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roger  </title>
		<link>http://www.leigeber.com/2008/05/javascript-color-fading-script/#comment-5366</link>
		<dc:creator>roger  </dc:creator>
		<pubDate>Thu, 17 Jul 2008 14:34:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.leigeber.com/?p=36#comment-5366</guid>
		<description>thanks! small but cool implementation http://redseacheck.com</description>
		<content:encoded><![CDATA[<p>thanks! small but cool implementation <a href="http://redseacheck.com" rel="nofollow">http://redseacheck.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Palle Nielsen</title>
		<link>http://www.leigeber.com/2008/05/javascript-color-fading-script/#comment-5247</link>
		<dc:creator>Palle Nielsen</dc:creator>
		<pubDate>Mon, 30 Jun 2008 16:50:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.leigeber.com/?p=36#comment-5247</guid>
		<description>I had the same problem as a couple here where the fade only works the first time. (fixed)

Problem can be seen on the link posted by someone else earlier
http://sandbox.leigeber.com/fader/fader3.html
If you hit one of the DIV links it works, but if you hit the same link again the fade does not happen again, you have to reload the page.

Not knowing exactly why in the colorFade funtion there is a "if(!target.r)" I did a workaround. I added "target.r=0;" efter the else clause in animateColor function.

-----cut------
  } else {
    clearInterval(target.timer);
    target.r=0;
    color = 'rgb(' + er + ',' + eg + ',' + eb + ')';
-----cut------

The thing is that the START color is not set for any additional hits to the funtion, so "startrgb" is undefined and the fade does not know what color to start with and ends up starting around the existing color (which is what the last fade ended on)

hope this helps someone</description>
		<content:encoded><![CDATA[<p>I had the same problem as a couple here where the fade only works the first time. (fixed)</p>
<p>Problem can be seen on the link posted by someone else earlier<br />
<a href="http://sandbox.leigeber.com/fader/fader3.html" rel="nofollow">http://sandbox.leigeber.com/fader/fader3.html</a><br />
If you hit one of the DIV links it works, but if you hit the same link again the fade does not happen again, you have to reload the page.</p>
<p>Not knowing exactly why in the colorFade funtion there is a &#8220;if(!target.r)&#8221; I did a workaround. I added &#8220;target.r=0;&#8221; efter the else clause in animateColor function.</p>
<p>&#8212;&#8211;cut&#8212;&#8212;<br />
  } else {<br />
    clearInterval(target.timer);<br />
    target.r=0;<br />
    color = &#8216;rgb(&#8217; + er + &#8216;,&#8217; + eg + &#8216;,&#8217; + eb + &#8216;)&#8217;;<br />
&#8212;&#8211;cut&#8212;&#8212;</p>
<p>The thing is that the START color is not set for any additional hits to the funtion, so &#8220;startrgb&#8221; is undefined and the fade does not know what color to start with and ends up starting around the existing color (which is what the last fade ended on)</p>
<p>hope this helps someone</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Parker</title>
		<link>http://www.leigeber.com/2008/05/javascript-color-fading-script/#comment-5198</link>
		<dc:creator>Parker</dc:creator>
		<pubDate>Thu, 26 Jun 2008 01:47:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.leigeber.com/?p=36#comment-5198</guid>
		<description>I appreciate the work you have done. It has helped me tremendously! I used this fade function with a transparent background function and it looks great. However, I'm having an issue with a bit of flicker and was curious what you thought it might be. Here is the site: http://www.yachtpartnership.org/yacht_preview.html
I've left all the JAVA and CSS in the HTML in order to show you.</description>
		<content:encoded><![CDATA[<p>I appreciate the work you have done. It has helped me tremendously! I used this fade function with a transparent background function and it looks great. However, I&#8217;m having an issue with a bit of flicker and was curious what you thought it might be. Here is the site: <a href="http://www.yachtpartnership.org/yacht_preview.html" rel="nofollow">http://www.yachtpartnership.org/yacht_preview.html</a><br />
I&#8217;ve left all the JAVA and CSS in the HTML in order to show you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.leigeber.com/2008/05/javascript-color-fading-script/#comment-5158</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sun, 22 Jun 2008 19:20:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.leigeber.com/?p=36#comment-5158</guid>
		<description>@Kurt - That function was only in place to eliminate the RGB from being calculated again again if it already existed. It is no big deal to remove that statement, not a huge overhead.</description>
		<content:encoded><![CDATA[<p>@Kurt - That function was only in place to eliminate the RGB from being calculated again again if it already existed. It is no big deal to remove that statement, not a huge overhead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kurt</title>
		<link>http://www.leigeber.com/2008/05/javascript-color-fading-script/#comment-5157</link>
		<dc:creator>Kurt</dc:creator>
		<pubDate>Sun, 22 Jun 2008 18:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.leigeber.com/?p=36#comment-5157</guid>
		<description>Regarding Curt's issue, the problem happens because of the conditional:

if(!target.r) { ... }

If the function runs a second time on the same element, it finds the old "r" and it messes up. Commenting out the conditional (but not the code inside) resolves the issue.

Michael, what is the purpose of that line of code?</description>
		<content:encoded><![CDATA[<p>Regarding Curt&#8217;s issue, the problem happens because of the conditional:</p>
<p>if(!target.r) { &#8230; }</p>
<p>If the function runs a second time on the same element, it finds the old &#8220;r&#8221; and it messes up. Commenting out the conditional (but not the code inside) resolves the issue.</p>
<p>Michael, what is the purpose of that line of code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.leigeber.com/2008/05/javascript-color-fading-script/#comment-5130</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 19 Jun 2008 18:34:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.leigeber.com/?p=36#comment-5130</guid>
		<description>@mcd - Take a look at the demo page, I added a link at the bottom that demonstrates. Just call the function as it is used in the font color transition section except on an a tag and not a div.</description>
		<content:encoded><![CDATA[<p>@mcd - Take a look at the demo page, I added a link at the bottom that demonstrates. Just call the function as it is used in the font color transition section except on an a tag and not a div.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mcd</title>
		<link>http://www.leigeber.com/2008/05/javascript-color-fading-script/#comment-5129</link>
		<dc:creator>mcd</dc:creator>
		<pubDate>Thu, 19 Jun 2008 17:47:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.leigeber.com/?p=36#comment-5129</guid>
		<description>This is great! It works great on regular text, but how do I get it to work on links? thanks!</description>
		<content:encoded><![CDATA[<p>This is great! It works great on regular text, but how do I get it to work on links? thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
