Free Photos
WordPress Themes

SVG to PNG fallback for Images

if (!Modernizr.svg) { $('img[src$=".svg"]').each(function() { $(this).attr('src', $(this).attr('src').replace('.svg', '.png')); }); }
A Modernizr 'If' statement for finding all inline svg images and replacing them with PNG's for legacy browsers.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.