Skip to content

Instantly share code, notes, and snippets.

@greut
Forked from bradwright/sleight-query.js
Created March 4, 2009 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greut/74068 to your computer and use it in GitHub Desktop.
Save greut/74068 to your computer and use it in GitHub Desktop.
// jQuery makes me lazy :-)
$(document).ready(function($) {
var toReplace = "/trans.gif";
$('img[src$=png]').each(function() {
$(this).css({
width: $(this).width() + 'px',
height: $(this).height() + 'px',
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + $(this).attr('src') + "', sizingMethod='scale')"
}).attr('src', toReplace);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment