Skip to content

Instantly share code, notes, and snippets.

// A very mini jQuery highsrc plugin
//
// By Zach Inglis, edited by Pete Duncanson to make HTML5 friendly ish
//
// Example:
// <img src="logo.png" data-highsrc="logo.svg" />
//
$(document).ready(function () {
if ( window.devicePixelRatio && window.devicePixelRatio > 1.5 ) {
jQuery("img[data-highsrc]").each(function() {