Skip to content

Instantly share code, notes, and snippets.

@foucist
Created May 26, 2013 18:14
Show Gist options
  • Save foucist/5653569 to your computer and use it in GitHub Desktop.
Save foucist/5653569 to your computer and use it in GitHub Desktop.
$(document).ready ->
$(".simple_form").on("ajax:success", (e, data, status, xhr) ->
$(".list").append xhr.responseText
).bind "ajax:error", (e, xhr, status, error) ->
$(".list").prepend xhr.responseText
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment