Created
August 24, 2009 05:28
-
-
Save nmanzi/173676 to your computer and use it in GitHub Desktop.
Shatner Roll code as used on RailsRumble '09 website.
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
hasRumbling = false | |
shatnerLoaded = false; | |
function stillRumbling() | |
{ | |
if(hasRumbling) return; | |
if(!shatnerLoaded) { | |
$(new Image()).load(function() { | |
shatnerLoaded = true; | |
stillRumbling(); | |
}).attr('src', '/images/still-rumbling.png'); | |
return; | |
} | |
var topHeight = 321; | |
var c = $("<div />").css({ | |
width: 527, | |
height: 0, | |
background: 'url(/images/still-rumbling.png) top center', | |
position: 'fixed', | |
bottom: 0, | |
right: 0, | |
"z-index": 1000, | |
cursor: 'pointer' | |
}).appendTo($("body")); | |
c.show().animate({ | |
height: 371 | |
}, 1500).click(function() { | |
var i = $(this); | |
$(this).animate({height: 0}, 1500, function() { i.remove(); hasRumbling = false; }); | |
}); | |
hasRumbling = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment