function runAfterElementExists(jquery_selector, callback) {var checker = window.setInterval(function() {if ($(jquery_selector).length) {clearInterval(checker);callback();}}, 200);} runAfterElementExists('.rightSide .price', function() { var price=4400; 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=3520;var priceRRP=4400;var percent=(100 - priceDefault / priceRRP *100 ).toFixed(0);$('.single .article_saving_badge').html('-'+percent+'%'); var ArtNr = $('.variationID').html();$('input[name="variationid"]').val('BR0393-BL-ST/SCA'); $(".ItemQuestionForm form > input[data-mail='subject']").val("Preisanfrage Artikel-Nummer: " + ArtNr); $('.ItemQuestionForm input[name="Artikelnr."]').attr('disabled', 'disabled').val(ArtNr);
<