Skip to content

Instantly share code, notes, and snippets.

@bnchdrff
Last active December 10, 2015 10:29
Show Gist options
  • Save bnchdrff/4421665 to your computer and use it in GitHub Desktop.
Save bnchdrff/4421665 to your computer and use it in GitHub Desktop.
birthday 4 dooug
<!DOCTYPE html>
<html>
<head>
<title>DOUG! BIRTHDAY! HAPPY!</title>
<style type="text/css">
img {
display: none;
}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
</head>
<body>
<span>happy birthday doug! ben wishes you a pleasant 3^3 and a happy noo year. yay!!!!!</span>
<br />
<script type="text/javascript">
(function($) {
$(document).ready(function() {
$q = $({});
$.each($('span').text(), function() {
var that = this;
$q.queue('cakes', function(next) {
$('<img src="cakeslice.gif" />').appendTo($('body')).fadeIn(50, next);
if ($q.queue('cakes').length % 9 == 0) $('<br />').appendTo($('body'));
});
});
$q.dequeue('cakes');
});
})(this.jQuery);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment