function runAfterElementExists(jquery_selector, callback) {var checker = window.setInterval(function() {if ($(jquery_selector).length) {clearInterval(checker);callback();}}, 200);} runAfterElementExists('.rightSide .price', function() { var price=220; var rebatePrice = ((price/100)*95).toFixed(2); $('.single .rebate').after().html('' + rebatePrice + ' EURIhr Preis inkl. 5% Rabatt bei Vorkasse oder Abholung im Ladengeschäft.'); }); var priceDefault=209;var priceRRP=220;var percent=(100 - priceDefault / priceRRP *100 ).toFixed(0);$('.single .article_saving_badge').html('-'+percent+'%'); var ArtNr = $('.variationID').html();$('input[name="variationid"]').val('Carbon Optik'); $(".ItemQuestionForm form > input[data-mail='subject']").val("Preisanfrage Artikel-Nummer: " + ArtNr); $('.ItemQuestionForm input[name="Artikelnr."]').attr('disabled', 'disabled').val(ArtNr);
<