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