Trusted Sehr gut 4.89 / 5.00
function runAfterElementExists(jquery_selector, callback) {var checker = window.setInterval(function() {if ($(jquery_selector).length) {clearInterval(checker);callback();}}, 200);} function prepareQuestionModal() { $('#Varianten-ID').val('13947pink'); $('#Artikel-ID').val('13947'); $('#Artikel-Name').val($('h1.title').text().trim()); $('#Artikel-ID,#Varianten-ID,#Artikel-Name').prop('readonly',true); }; prepareQuestionModal();