1 2jQuery(document).ready(function(event) { 3 "use strict"; 4 5 jQuery('.ekit-mailChimpForm').on('submit', ajaxMailSubmit); 6 7 function ajaxMailSubmit(e) { 8 e.preventDefault(); 9 var mailForm = jQuery(this).serialize(); 10 var listed = jQuery(this).attr('data-listed'); 11 12 jQuery.ajax({ 13 data : mailForm, 14 type : 'get', 15 url : ekit_site_url.siteurl+'/wp-json/elementskit/v1/widget/mailchimp/sendmail/?listed='+listed, 16 success : function( response ) { 17 //var messageBox = jQuery(this).find('.ekit-mail-message'); 18 var messageBox = jQuery('.ekit-mail-message'); 19 if(response.error.length > 0){ 20 messageBox.html( 'Found error : ' + response.error ); 21 return; 22 } 23 var obj = JSON.parse(response.success.body); 24 if(obj.status == 'subscribed'){ 25 messageBox.html('Successfully listed this email'); 26 return; 27 } 28 messageBox.html(obj.title); 29 } 30 }); 31 } 32});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.