Created
June 26, 2011 19:31
-
-
Save rosstuck/1047897 to your computer and use it in GitHub Desktop.
Foolin' around with Coffeescript
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
<!doctype html> | |
<head> | |
<title>Coffeescript, go!</title> | |
<script type="text/javascript" src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js"></script> | |
<script src="http://raphaeljs.com/raphael.js" type="text/javascript" charset="utf-8"></script> | |
<script type="text/coffeescript"> | |
paper = Raphael 0, 0, 300, 300 | |
circle = paper.circle 50, 50, 10 | |
circle.attr | |
fill: '#050' | |
stroke: 'none' | |
circle.click -> | |
alert "You've clicked my beautiful circle! You monster!" | |
</script> | |
</head> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment