Skip to content

Instantly share code, notes, and snippets.

@himynameisjonas
Created March 1, 2011 06:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save himynameisjonas/848736 to your computer and use it in GitHub Desktop.
Save himynameisjonas/848736 to your computer and use it in GitHub Desktop.
replace all images with kittens
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