Skip to content

Instantly share code, notes, and snippets.

@rupl
Last active August 29, 2015 14:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rupl/9261c0b83a9898b7aae9 to your computer and use it in GitHub Desktop.
Save rupl/9261c0b83a9898b7aae9 to your computer and use it in GitHub Desktop.
Make kitties appear when someone resizes the window
// Paste this into your console to give it a try!
(function($){
$(window).resize(function() {
$('<img src="http://placekitten.com/g/' + (window.innerWidth - 100) + '/' + (window.innerHeight - 100) + '">')
.css({'position': 'absolute', 'top': '50px'})
.appendTo('body');
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment