1$(document).ready(function(){ 2 3 $('.catalog-section-calc').each(function() { 4 var itemId = $(this).data('calc'); 5 var itemClass = '.catalog-section-calc_' + itemId; 6 7 var price_calc_value = parseInt($(itemClass + " .calc__price").text().replace(/\s+/g, '')); 8 var price_old_calc_value = parseInt($(itemClass + " .calc__price_old").text().replace(/\s+/g, '')); 9 10 var benefit = Math.round(price_old_calc_value - price_calc_value); 11 var discount = Math.round(benefit / (price_old_calc_value / 100)); 12 13 $(itemClass + " .calc__economy").text(benefit); 14 $(itemClass +" .calc__skidka").text(discount); 15 }); 16 17}); 18
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.