function runAfterElementExists(jquery_selector, callback) {var checker = window.setInterval(function() {if ($(jquery_selector).length) {clearInterval(checker);callback();}}, 200);} var ArtNr = $('.articlenumber span').html(); $('input[name="Artikelnr."]').val('522420-21_S'); $(".ItemQuestionForm form > input[data-mail='subject']").val("Artikel-Nummer: " + ArtNr); $('.ItemQuestionForm input[name="Artikelnr."]').attr('disabled', 'disabled').val(ArtNr); runAfterElementExists('.widget-attribute .variation-select .d-none', function() {var div = $('.variation-select').length;if (div < 3){$('.variation-select').addClass('show');$('.variation-select .d-none').removeClass('d-none');}})