1if (typeof jQuery === 'undefined') { 2 console.log('no jquery loaded'); 3} else { 4 var $j = jQuery.noConflict(); 5 $j(document).ready(function () { 6 $j(".atkp-ajax-container").each(function (i, obj) { 7 8 var endpointurl = $j(obj).attr('data-endpointurl'); 9 var uid = $j(obj).attr('data-uid'); 10 11 var x = $j('#atkp-data-parameters-' + uid).html(); 12 var x2 = $j('#atkp-data-products-' + uid).html(); 13 14 var atkpparameters = JSON.parse(x); 15 var atkpproducts = JSON.parse(x2); 16 17 $j(obj).addClass('atkp-spinloader-round'); 18 19 $j.post(endpointurl, 20 { 21 action: 'atkp_render_template', 22 products: JSON.stringify(atkpproducts), 23 parameters: JSON.stringify(atkpparameters), 24 }, 25 function (data, status) { 26 27 if (status == 'success') { 28 //hide info?? 29 30 switch (data.status) { 31 case 'okay': 32 //rendering ok 33 $j(obj).html(data.html); 34 break; 35 case 'error': 36 $j(obj).html(data.error + '<br />' + data.message); 37 break; 38 default: 39 $j(obj).html("unknown error on loading"); 40 break; 41 } 42 43 } 44 45 $j(obj).removeClass('atkp-spinloader-round'); 46 }).fail(function () { 47 $j(obj).removeClass('atkp-spinloader-round'); 48 $j(obj).html("server side error on loading"); 49 }); 50 }); 51 }); 52}
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.