Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Quick demo of how to do a simple jQuery binding in CoffeeScript
$(document).ready ->
$('form').submit ->
$(document).ready(function() {
return $('form').submit(function() {
return $(this).find('.ajax-loader').show();
$ -> $('form').submit -> $(@).find('.ajax-loader').show()
Copy link

sdball commented Dec 26, 2011

Thanks for the improvement!

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