Created
March 1, 2011 06:48
-
-
Save himynameisjonas/848736 to your computer and use it in GitHub Desktop.
replace all images with kittens
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
jQuery("body").find('img').each(function(i,img) { | |
var w = img.width; | |
var h = img.height; | |
if (w && h) { | |
var src = 'http://placekitten.com/'+w+'/'+h; | |
img.src = src; | |
} | |
}); | |
// code from https://github.com/lsemel/jquery-placekitten |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment