Skip to content

Instantly share code, notes, and snippets.

@Papillard
Created February 21, 2014 09:37
Show Gist options
  • Save Papillard/9131396 to your computer and use it in GitHub Desktop.
Save Papillard/9131396 to your computer and use it in GitHub Desktop.
jQuery script for remote comment posting
$('#comments').prepend("<%= j render partial: 'comment', locals: {comment: @comment} %>");
$('.counter').html("<%= j pluralize(@challenge.comments_count, 'comment')%> posted");
$('.comment-box:first').animate({backgroundColor: "rgba(45,195,89,0.2)"}, 50);
$('.comment-box:first').delay(1000).animate({backgroundColor: "#FFFF"}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment