RsD0p9BK
7/30/2013 - 12:26 PM

http://coffeescriptcookbook.com/chapters/jquery/ajax

$.ajax '/',
    type: 'GET'
    dataType: 'html'
    error: (jqXHR, textStatus, errorThrown) ->
        $('body').append "AJAX Error: #{textStatus}"
    success: (data, textStatus, jqXHR) ->
        $('body').append "Successful AJAX call: #{data}"