$("#card-<%= @anime.slug %>").after('<%= j render(partial: "anime/card", locals: {anime: @anime, watchlist: @watch, last: false}) %>').remove();

$("#card-<%= @anime.slug %>").replaceWith('<%= j render(partial: "anime/card", locals: {anime: @anime, watchlist: @watch, last: false}) %>');

Use replaceWith() instead of after().delete();
Use replaceWith() instead of after().delete();
