Super Simple jQuery PNG Fix for IE6 background images


/ Published in: jQuery
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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. });

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.