ready = function() { $('[data-quickpay]').on("ajax:success", function(e, data, status, xhr) { if (this.id !== "dagschotel_quickpay") { // Last Image var img = $("", { src: $(this).closest(".overviewthumbnail").find(".avatar").attr("src").replace("large", "small"), class: ["img-responsive img-circle img-thumbnail"] }) $(img).hide().prependTo($("#last")).fadeIn(); if ($("#last").find("img").size() > 10) { $("#last").find("img").last().remove(); } $(".alert").fadeOut(); // Flash Message var div = $("
", { class: ["alert alert-success alert-dismissable"] }); $(div).append($("