HEX
Server: Apache
System: Linux 244.240.109.208.host.secureserver.net 5.14.0-611.11.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Dec 3 09:47:37 EST 2025 x86_64
User: icsla (1002)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/icsla/public_html/wp-content/plugins/megamenu/js/admin/dismiss-notices.js
(function ($) {
	"use strict";

	$(document).on("click", ".notice-dismiss[data-megamenu-dismiss]", function (e) {
		e.preventDefault();
		var $btn = $(this);
		var notice = $btn.attr("data-megamenu-dismiss");
		var nonce = $btn.attr("data-megamenu-dismiss-nonce");
		var $notice = $btn.closest(".notice");

		if (!notice || !nonce || !window.megamenuDismissNotices || !window.megamenuDismissNotices.ajaxUrl) {
			return;
		}

		$btn.prop("disabled", true);

		$.post(window.megamenuDismissNotices.ajaxUrl, {
			action: "megamenu_dismiss_admin_notice",
			nonce: nonce,
			notice: notice,
		})
			.done(function (response) {
				if (response && response.success) {
					$notice.fadeTo(100, 0, function () {
						$(this).slideUp(100, function () {
							$(this).remove();
						});
					});
				} else {
					$btn.prop("disabled", false);
				}
			})
			.fail(function () {
				$btn.prop("disabled", false);
			});
	});
})(jQuery);