Skip to content

Instantly share code, notes, and snippets.

@bryansray
Created August 17, 2008 06:42
Show Gist options
  • Save bryansray/5793 to your computer and use it in GitHub Desktop.
Save bryansray/5793 to your computer and use it in GitHub Desktop.
$(document).ready(function($){
$("div.comment_form form").attach(CommentForm);
$(".comments .actions .delete").attach(RemoveComment, { type: 'DELETE', dataType: 'json' });
});
RemoveComment = $.klass(Remote.Link, {
initialize: function($super, options) {
this.comment = this.element.parents(".comment");
$super(options);
},
complete: function(response, result) {
},
success: function(a, b) {
this.comment.fadeOut('5000');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment