ds-sleight.
I got an email this morning asking for help with ds-sleight.js. I subsequently discovered that Google didn’t know anything about it except what other people have written. So here’s some quasi-official documentation:
ds-sleight is a small blob of JavaScript I’ve been using since the year 200X to force Internet Explorer to render the 8-bit alpha channel in 32-bit PNG images. (You might recall me whining about IE’s miserable support for PNG transparency back in 2002.)
There’s a little by way of instruction in the JavaScript source; here’s a slightly more verbose version of the installation procedure:
- Save a one-pixel transparent GIF (like this one) somewhere on your server (default path:
/images/spacer.gif
). Don’t hotlink it off dsandler.org, or I’ll hunt you down and kick your ass. - Copy
ds-sleight.js
to your server as well. - Add to any page that has a PNG with alpha:
<script src="
«path»/ds-sleight.js" type="text/javascript"></script>
It even (mostly) works on PNGs used as CSS background-image
s.
Enjoy (if you haven’t already)!