1 $(document).ready(function () {
2 $(".messages-table .destroy-message").on("turbo:submit-end", function (event) {
3 if (event.detail.success) {
4 event.target.dataset.isDestroyed = true;
8 $(".messages-table .message-summary").on("turbo:before-morph-element", function (event) {
9 if ($(event.target).find("[data-is-destroyed]").length > 0) {
10 event.preventDefault(); // NB: prevent Turbo from morhping/removing this element
11 $(event.target).fadeOut(800, "linear", function () {