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 12 var atkpparameters = JSON.parse($j('#atkp-data-parameters-' + uid).html()); 13 var atkpproducts = JSON.parse($j('#atkp-data-products-' + uid).html()); 14 15 $j(obj).addClass('atkp-spinloader-round'); 16 17 $j.post(endpointurl, 18 { 19 action: 'atkp_render_template', 20 products: JSON.stringify(atkpproducts), 21 parameters: JSON.stringify(atkpparameters), 22 }, 23 function (data, status) { 24 25 if (status == 'success') { 26 //hide info?? 27 28 switch (data.status) { 29 case 'okay': 30 //rendering ok 31 $j(obj).html(data.html); 32 break; 33 case 'error': 34 $j(obj).html(data.error + '<br />' + data.message); 35 break; 36 default: 37 $j(obj).html("unknown error on loading"); 38 break; 39 } 40 41 } 42 43 $j(obj).removeClass('atkp-spinloader-round'); 44 }).fail(function () { 45 $j(obj).removeClass('atkp-spinloader-round'); 46 $j(obj).html("server side error on loading"); 47 }); 48 }); 49 }); 50}
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.