Victus Spiritus

home

Clientside CoffeeScript with jQuery

30 May 2011

Before digging into node.js servers with CoffeeScript, I branched off by mimicking a simple client example by Arbo von Monkiewitsch.
[iframe http://victusfate.github.com/client_side_coffeescript/ 650 1000]
It attaches a callback function to a click event and updates the page. Note that I haven't passed in an object by reference (return changes), otherwise I could have called a swap function, from within the show message function.

Feel free to browse my coffeescript tag for more clientside hacks.

After this simple client side example I've got a plateful of fun ahead of me thanks to Henri Bergius' gist capturing node.js exercises from Up and Running with Node.js at the Falsy Values workshop (via the Tumblr CoffeeScript tag and ReadWriteWeb post by Klint Finley).

[iframe https://gist.github.com/999117 650 2000]