-
-
Save anythinggraphic/6d0c897d21a35d0c3db9 to your computer and use it in GitHub Desktop.
A Better Reina.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Alter line 50 of retina.js version 1.3.0. Instead of getting an element by it's tag name (image), we will be getting it by a class name. This helps in reducing 404 errors when there is no retina version of an image. | |
// Old line 50 | |
var images = document.getElementsByTagName('img'), retinaImages = [], i, image; | |
// Change to this | |
var images = document.getElementsByClassName('has-retina'), retinaImages = [], i, image; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment