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('sm13142sw'); $('#Artikel-ID').val('13142'); $('#Artikel-Name').val($('h1.title').text().trim()); $('#Artikel-ID,#Varianten-ID,#Artikel-Name').prop('readonly',true); }; prepareQuestionModal();