Posted By

oscargodson on 04/03/09


Tagged

javascript jquery ie6 pngfix


Versions (?)

Who likes this?

14 people have marked this snippet as a favorite

benrudolph
irishsk
indamix
sheedy
elisium
asifroyal
alejandrosuch
fenta23
x0nine
jay0917
wearefreya
sethetter
o0110o
aberdas


Super Simple jQuery PNG Fix for IE6 background images


 / Published in: jQuery
 

URL: http://itknowledgeexchange.techtarget.com/web-standards/jquery-png-fix-for-ie6-single-instance-images/

This was not written by me, but Jeffrey Olchovy. I uploaded it here because his blog messes up the quotes.

  1. /*
  2.   Works best for background images with set dimensions
  3.   Just add a ".pngfix" class to anything you want fixed
  4.   or put in some other jQuery selector.
  5. */
  6. $('.pngfix').each( function() {
  7. $(this).attr('writing-mode', 'tb-rl');
  8. $(this).css('background-image', 'none');
  9. $(this).css( 'filter', 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="path/to/image.png",sizingMethod="scale")');
  10. });

Report this snippet  

You need to login to post a comment.