PNG-Transparency for Windows IE 5.5 & 6

Source: http://jquery.andreaseberhard.de/pngFix/
This plugin will fix the missing PNG-Transparency in Windows Internet Explorer 5.5 & 6.

Version 1.1, 2007-09-11

Tested on Windows XP SP2 with
– IE 5.5 + 6 + 7

pngFix

Features
* unobtrusive script, simple to setup
* works now also with CSS-Backgrounds (but scaling backgrounds)
* works with PNG-Images within Links
* TITLE, ALT, CLASS and STYLE-Attributes are considered

This page uses jQuery Version 1.3.2

E x a m p l e s:
PNG with transparency

<img src="pngtest.png" width="173" height="173" alt="This is the alt-Text" />

PNG with TITLE-Attribute

<img src="pngtest.png" width="173" height="173"
    title="This is the title-Text" alt="This is the alt-Text" /> 

PNG within a link

<a href="#" onclick="alert('click');return false;">
    <img src="pngtest.png" width="173" height="173"
        title="This is the title-Text" alt="This is the alt-Text" />
</a> 

PNG within a link and a STYLE-Attribute

<a href="#" onclick="alert('click');return false;">
    <img src="pngtest.png" width="173" height="173"
        style="border:1.0em dashed #090;padding:10px;margin:10px;"
        title="This is the title-Text" alt="This is the alt-Text" />
</a> 

Div with PNG-Background via CSS

<div>
<div style="float:left;width:173px;height:173px;
background: url(pngtest.png);">
This is a div-Container using a png as background ...
</div>
<div style="float:right;width:346px;height:346px;
background: white url(pngtest.png);">
This is a div-Container using a png as background ...
</div>
<div style="clear:both;"></div>
</div> 

How to use jquery.pngFix.js
1.
Download jQuery
Download pngFix.zip

2.
Add jQuery and pngFix to the HEAD-Section of your HTML …

<head>
...
<script type="text/javascript" src="jquery-latest.pack.js"></script>
<script type="text/javascript" src="jquery.pngFix.js"></script>
...
</head>

3.
Activate pngFix on document.ready

<head>
...
<script type="text/javascript">
    $(document).ready(function(){
        $(document).pngFix();
    });
</script>
...
</head>