Skip to content

Instantly share code, notes, and snippets.

@rosstuck
Created June 26, 2011 19:31
Show Gist options
  • Save rosstuck/1047897 to your computer and use it in GitHub Desktop.
Save rosstuck/1047897 to your computer and use it in GitHub Desktop.
Foolin' around with Coffeescript
<!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