jQuery ifixpng – Plugin für Transparenz-Problem

Wer kennt das Problem nicht. Man will ein transparentes png einbinden und bekommt Probleme in den älteren Versionen des Internet Explorer.
Klar gibts dafür schon Lösungen wie den pngfix von TwinHelix etc.
Allerdings fand ich bisher keine so einfach und geschickt wie jQuery.ifixpng.
Das Plugin lässt sich allgemein auf alle Dateien eines Typs oder auch gezielt auf id´s angewendet werden.
Es gibt momenta noch zwei, drei Probleme die aber im Normalfall nicht ins Gewicht fallen.
Unter anderem müssen die Elemente auf die der Hack angewandt wird visible sein.
Background positionierung und repeating gehen leider auch nicht. Wird aber normal eh weniger ein Thema sein wenn man den Hack braucht.
Hier wie immer ein simples Beispiel:
1 2 3 4 5 6 7 8 9 10 11 | // apply to all png images $('img[@src$=.png]').ifixpng(); // apply to all png images and to div#logo $('img[@src$=.png], div#logo').ifixpng(); // apply to div#logo, undo fix, then apply the fix again $('img[@src$=.png], div#logo').ifixpng().iunfixpng().ifixpng(); // apply to div#logo2, modify css property and add click event $('div#logo2').ifixpng().css({cursor:'pointer'}).click(function(){ alert('ifixpng is cool!'); });; |
Alle weiteren Infos, sowie das Plugin zum Download findet Ihr auf der offiziellen Homepage.


























