Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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