PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/flavoredfog.co.uk/wp-content/plugins/kutetheme-toolkit/mailchimp/assets/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/flavoredfog.co.uk/wp-content/plugins/kutetheme-toolkit/mailchimp/assets/script.js

(function($){
    "use strict"; // Start of use strict
    
    /* ---------------------------------------------
     Scripts ready
     --------------------------------------------- */
    $(document).ready(function() { 
        
        init_mailchimp();
    });
    /* ---------------------------------------------
     Mailchimp
     --------------------------------------------- */
    function init_mailchimp(){
        
        $( 'body' ).on( 'submit', '.mailchimp-form', function ( e ){
            e.preventDefault();
            var $mForm = $(this),
                $button = $mForm.find('.mailchimp-submit'),
                $error = $mForm.find('.mailchimp-error').fadeOut(),
                $success = $mForm.find('.mailchimp-success').fadeOut();
            
            $button.addClass('loading').html($button.data('loading'));
            
            var data = {
                action: 'frontend_mailchimp',
                security : ajax_mailchimp.security,
                email: $mForm.find('input[name=email]').val(),
                list_id: $mForm.find('input[name=list_id]').val(),
                opt_in: $mForm.find('input[name=opt_in]').val()
            };
            
            $.post(ajax_mailchimp.ajaxurl, data, function(response) {
                $button.removeClass('loading').html($button.data('text'));
                
                if(response.error == '1'){
                    $error.html(response.msg).fadeIn();
                }else{
                    $success.fadeIn();
                }
            }, 'json');
        });
    }
})(jQuery); // End of use strict