Skip to content

Instantly share code, notes, and snippets.

@AnsonT
Created July 29, 2011 18:04
Show Gist options
  • Save AnsonT/1114364 to your computer and use it in GitHub Desktop.
Save AnsonT/1114364 to your computer and use it in GitHub Desktop.
Client-side Coffeescript with Jade and JQuery
!!! 5
html(lang='en')
head
title Title
script(type='text/javascript', src='javascripts/jquery.js')
script(type='text/javascript', src='http://jashkenas.github.com/coffee-script/extras/coffee-script.js')
:coffeescript
$(document).ready -> alert 'Hello World'
@AnsonT
Copy link
Author

AnsonT commented Jul 29, 2011

Example of using client-side CoffeeScript with JQuery in Jade templates.
This example uses a private copy of jQuery. Production code should pre-compile CoffeeScript to js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment