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