Skip to content

Instantly share code, notes, and snippets.

@grayghostvisuals
Created March 27, 2013 19:40
Show Gist options
  • Select an option

  • Save grayghostvisuals/5257370 to your computer and use it in GitHub Desktop.

Select an option

Save grayghostvisuals/5257370 to your computer and use it in GitHub Desktop.
High-Res Image Swapping w/Modernizr and JavaScript
// http://dbushell.com/2013/02/04/a-primer-to-front-end-svg-hacking
if (!Modernizr.svg) {
$('img[src$=".svg"]').each(function() {
$(this).attr('src', $(this).attr('src').replace('.svg', '.png'));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment