<?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>AjaxMasters Blog &#187; ie6</title> <atom:link href="http://blog.ajaxmasters.com/tag/ie6/feed/" rel="self" type="application/rss+xml" /><link>http://blog.ajaxmasters.com</link> <description>Just another WordPress weblog</description> <lastBuildDate>Thu, 24 Jun 2010 11:55:25 +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>PNG rollover function for IE 6 using JavaScript</title><link>http://blog.ajaxmasters.com/png-rollover-function-for-ie-6-using-javascript/</link> <comments>http://blog.ajaxmasters.com/png-rollover-function-for-ie-6-using-javascript/#comments</comments> <pubDate>Tue, 22 Sep 2009 21:38:35 +0000</pubDate> <dc:creator>Chocksy</dc:creator> <category><![CDATA[Tutorial]]></category> <category><![CDATA[fix]]></category> <category><![CDATA[ie6]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[png]]></category> <category><![CDATA[transparency]]></category><guid
isPermaLink="false">http://blog.ajaxmasters.com/?p=19</guid> <description><![CDATA[<a
href="http://blog.ajaxmasters.com/png-rollover-function-for-ie-6-using-javascript/"><img
align="left" hspace="5" width="150" height="150" src="http://blog.ajaxmasters.com/wp-content/uploads/2009/09/PNG-fixie6-170x170.png" class="alignleft wp-post-image tfe" alt="PNG Fix for IE6" title="PNG-fixie6" /></a>Last night i was working on a site that uses a lot of transparent .png&#8217;s . As we all know, our dear MS IE 6 doesn&#8217;t know how to handle the transparency of PNG files.
For quite a while, i was using a Javascript png fix called SUPERSLEIGHT and i was very happy about how it worked.
But last night i came into a problem. I needed to make some rollover images [...]]]></description> <content:encoded><![CDATA[<p><div
id="attachment_23" class="wp-caption alignleft" style="width: 310px"><a
href="http://blog.ajaxmasters.com/wp-content/uploads/2009/09/PNG-fixie6.png"><img
src="http://blog.ajaxmasters.com/wp-content/uploads/2009/09/PNG-fixie6.png" alt="PNG Fix for IE6" title="PNG-fixie6" width="300" height="300" class="size-full wp-image-23" /></a><p
class="wp-caption-text">PNG Fix for IE6</p></div>Last night i was working on a site that uses a lot of transparent .png&#8217;s . As we all know, our dear MS IE 6 doesn&#8217;t know how to handle the transparency of PNG files.</p><p>For quite a while, i was using a Javascript png fix called <a
href="http://snipplr.com/view/4224/ie-6-transparent-png-fix--supersleight/">SUPERSLEIGHT</a> and i was very happy about how it worked.</p><p>But last night i came into a problem. I needed to make some rollover images which were transparent PNG&#8217;s, and when the images change, the transparency fix will break. So i started looking for a solution and i came over <a
href="http://homepage.ntlworld.com/bobosola/png_mouseover.htm">this</a> function, which works perfect. The only thing was that this won`t work togheter with the original SUPERSLEIGHT script and it only fixes the png`s in IMG tags, and i had a lot of PNG images as backgrounds, inputs, etc.</p><p>So i changed the supersleight script to ignore PNG`s in IMG tags, and i merged it with the other script.</p><p><strong
class="in_title">How it works :</strong></p><p>- Link the &#8217;supersleight-swap.js&#8217; file into your document inside conditional comments so that it is delivered to only Internet Explorer 6 or older.</p><pre class="brush: xml;">
&lt;!--[if lte IE 6]&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;path/to/supersleight-swap.js&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;
</pre><p>- Copy &#8216;x.gif&#8217; in the same directory as the page you&#8217;re using PNG&#8217;s on.</p><p>- Put in the function that swaps the images (for NORMAL browsers) :</p><pre class="brush: jscript;">
function imgSwap(oImg)
{
   var strOver  = &quot;_on&quot;    // image to be used with mouse over
   var strOff = &quot;_off&quot;     // normal image
   var strImg = oImg.src
   if (strImg.indexOf(strOver) != -1)
      oImg.src = strImg.replace(strOver,strOff)
   else
      oImg.src = strImg.replace(strOff,strOver)
}
</pre><p>- Call the function in the &#8216;onmouseover&#8217; and &#8216;onmouseout&#8217; event of the IMG.</p><pre class="brush: xml;">
&lt;img alt=&quot;a png image&quot; src=&quot;path/to/image_off.png&quot; onmouseover=&quot;imgSwap(this)&quot; onmouseout=&quot;imgSwap(this)&quot; id=&quot;img1&quot;&gt;
</pre><p>Note that each PNG must have an ID attribute for this to work.</p> ]]></content:encoded> <wfw:commentRss>http://blog.ajaxmasters.com/png-rollover-function-for-ie-6-using-javascript/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 9/27 queries in 0.004 seconds using disk

Served from: blog.ajaxmasters.com @ 2010-07-31 13:35:16 -->