Skip to content

Instantly share code, notes, and snippets.

@sdball
Created December 15, 2011 00:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sdball/1479276 to your computer and use it in GitHub Desktop.
Save sdball/1479276 to your computer and use it in GitHub Desktop.
Quick demo of how to do a simple jQuery binding in CoffeeScript
$(document).ready ->
$('form').submit ->
$(this).find('.ajax-loader').show()
$(document).ready(function() {
return $('form').submit(function() {
return $(this).find('.ajax-loader').show();
});
});
$ -> $('form').submit -> $(@).find('.ajax-loader').show()
@sdball
Copy link
Author

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