HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: /var/www/javaapp.co.uk/wp-content/plugins/master-slider/admin/assets/js/global.js
(function($, window, document, undefined){
    "use strict";
    $('.ms-close-notice').on('click', function(event){
        event.preventDefault();
        var $this  = $(this),
            _id    = $this.data('id');

        jQuery.post(
            ajaxurl,
            {
                action    : 'msp_dismiss_notice', // the handler
                msnonce   : __MS_GLOBAL.dismiss_nonce,
                _id       : _id
            },
            function(res){
                if( ! res.success ){
                    alert( res.data.message );
                } else {
                    $this.closest('.msp-notice-wrapper').hide();
                }
            }
        );

    });

    $('.rate-btn').on('click', function(event){
        var $this  = $(this);
        var delay = $this.hasClass('delay') ? 'delay' : '';
        jQuery.post(
            ajaxurl,
            {
                action    : 'msp_dismiss_rate_notice', // the handler
                msnonce   : __MS_GLOBAL.dismiss_nonce,
                delay     : delay
            },
            function(res){
                if( ! res.success ){
                    alert( res.data.message );
                } else {
                    $this.parents('.msp-rate').find('button.notice-dismiss').click();
                }
            }
        );

    });
})(jQuery, window, document);