And of course Jorn trumps me as soon as I hit send.

I didn't realize the filter could be placed that way, but lo and behold.  I'm 
never replying before reading all the messages again ;)

-ALEX

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jörn Zaefferer
Sent: Thursday, November 09, 2006 12:17 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Transparent PNG IE plugin for jQuery?

[EMAIL PROTECTED] schrieb:
> Andy,
>
> I looked pretty extensively some weeks ago for exactly the same thing, and 
> came up empty. There are several solutions available for IMG tags, as you 
> state, but all of them seem to use imposition of a background on the image by 
> inserting a SPAN tag. Hence, the solutions do not work for background images 
> themselves.
>
> I unfortunately had to ultimately throw in the towel and use GIFs.
>   
Then you, too, may be interested in Steven's stuff, take a look at this 
goodie:

  // Fix background PNGs in IE6
  if (navigator.appVersion.match(/MSIE [0-6]\./)) {
    $('*', e).each(function () {
      if (this.currentStyle.backgroundImage != 'none') {
        var image = this.currentStyle.backgroundImage;
        image = this.currentStyle.backgroundImage.substring(5, image.length - 
2);
        $(this).css({
          'backgroundImage': 'none',
          'filter': 
"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, 
sizingMethod=crop, src='" + image + "')"
        });
      }
    });
  }

Whatever the "e" context may be, but the solution is quite obvious.

-- 
Jörn Zaefferer

http://bassistance.de


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to