Last active
August 29, 2015 14:27
-
-
Save rupl/9261c0b83a9898b7aae9 to your computer and use it in GitHub Desktop.
Make kitties appear when someone resizes the window
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
// 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