Categories
JavaScript jquery

jquery pngFix fixed

I tried to use the pngFix from this website: http://jquery.andreaseberhard.de/pngFix/. But it didn’t work and i received an javascript error in IE6.

After several minutes of debugging and tries i found out that the error is generated by old syntax in selecting elements. It used

jQuery(this).find("img[@src$=.png]").each(...);

instead of

jQuery(this).find("img[src$=.png]").each(...);

So the fix is: Remove the “@” character form the selector string.

The same thing for the “pack” version except that the replaced string is:

[@m$=.M]

and the replacement string is:

[m$=.M]

.