Sha256: c83f98d44764fc399791697257b107d31d9b293ac563b8192bad08e8810f5e72
Contents?: true
Size: 581 Bytes
Versions: 45
Compression:
Stored size: 581 Bytes
Contents
$(() => { $(document).on("click", "a[data-open-url],button[data-open-url]", (event) => { event.preventDefault(); const link = event.currentTarget; const $modal = $(`#${link.dataset.open}`); $modal.html("<div class='loading-spinner'></div>"); $.ajax({ type: "get", url: link.dataset.openUrl, success: (html) => { const $html = $(html); $modal.html($html); $html.foundation(); }, error: function (request, status, error) { $modal.html(`<h3>${status}</h3><p>${error}</p>`); } }); }); });
Version data entries
45 entries across 45 versions & 1 rubygems