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