Created
November 14, 2018 09:23
-
-
Save AaronLayton/26317ac14c3bcdceaa80b33e354ca4aa to your computer and use it in GitHub Desktop.
Highlight all lazyloaded `data-src` images
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
$('[data-src]').wrap($('<div />').addClass('preload-highlighter')); | |
$('body').append(` | |
<style> | |
.preload-highlighter { position: relative; } | |
.preload-highlighter:after { | |
content: ''; | |
display: block; | |
position: absolute; | |
top:0; | |
left: 0; | |
right: 0; | |
bottom: 0; | |
background: rgba(255,0,0,.2); | |
border: 1px solid #f00; | |
} | |
</style> | |
`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment