Created
December 23, 2011 05:21
-
-
Save jordanorelli/1513234 to your computer and use it in GitHub Desktop.
casper floats across the screen
This file contains hidden or 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
<script src="static/js/raphael-min.js"></script> | |
<span id="injection" style="display:none;"> </span> | |
<script>(function() { | |
$("#injection").parent().parent().remove(); | |
var paper = new Raphael("content", "100%", "100%"); | |
$(paper.canvas).css({ | |
position: "absolute", | |
left: 0, | |
top: 0, | |
"z-index": 200 | |
}); | |
var imagePath = "static/images/casper.png"; | |
var casper = paper.image(imagePath, 0, "20%", 333, 187); | |
casper.attr('opacity', 0.00); | |
casper.animate({opacity: 1.0, x: 400}, 1000, "linear", function() { | |
casper.animate({opacity: 0.0, x: 800}, 1000, "linear", function() { | |
$(paper.canvas).remove(); | |
}); | |
}); | |
})();</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment