Created
December 15, 2011 00:31
-
-
Save sdball/1479276 to your computer and use it in GitHub Desktop.
Quick demo of how to do a simple jQuery binding in CoffeeScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready -> | |
$('form').submit -> | |
$(this).find('.ajax-loader').show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
return $('form').submit(function() { | |
return $(this).find('.ajax-loader').show(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> $('form').submit -> $(@).find('.ajax-loader').show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the improvement!