Sprache
Lieferland
document.addEventListener('DOMContentLoaded', function() { if ($('.crossprice').length > 0){ var oldUVP=$('.single-right .crossprice>del').text().replace(/,/,".").replace(/EUR/," "); var currentPrice = $('.single-right .price.h1>span:first-child').text().replace(/,/,".").replace(/EUR/," "); var oldUVP=oldUVP.replace(/[^0-9\.]+/g,""); var currentPrice = currentPrice.replace(/[^0-9\.]+/g,""); function calculatePercent() { var percent = (oldUVP-currentPrice)/oldUVP*100;var percentRound = Math.round(percent); $(".savingPart").html("-"+percentRound+"%"); }; calculatePercent(); };});
Rasentraktoren-Motoren – Newsletter