Server IP : 192.64.118.117 / Your IP : 18.119.108.165 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/thecgapy/www/wp-content/plugins/wp-smushit/assets/js/ |
Upload File : |
/** * Created by umeshkumar on 12/05/16. */ jQuery(function () { var el_notice = jQuery(".smush-notice"), btn_act = el_notice.find(".smush-notice-act"), btn_dismiss = el_notice.find(".smush-notice-dismiss"); el_notice.fadeIn(500); // Hide the notice after a CTA button was clicked function remove_notice() { el_notice.fadeTo(100, 0, function () { el_notice.slideUp(100, function () { el_notice.remove(); }); }); } btn_act.click(function (ev) { remove_notice(); notify_wordpress(btn_act.data("msg")); }); btn_dismiss.click(function (ev) { remove_notice(); notify_wordpress(btn_act.data("msg")); }); // Notify WordPress about the users choice and close the message. function notify_wordpress(message) { el_notice.attr("data-message", message); el_notice.addClass("loading"); //Send a ajax request to save the dismissed notice option var param = { action: 'dismiss_upgrade_notice' }; jQuery.post(ajaxurl, param); } //Store the preference in db jQuery('.wp-smush-update-info').on('click', '.notice-dismiss', function (e) { e.preventDefault(); var $el = jQuery(this); $el.fadeTo( 100, 0, function() { $el.slideUp( 100, function() { $el.remove(); }); }); var param = { action: 'dismiss_update_info' }; jQuery.post(ajaxurl, param); }); });