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