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('2222-30007-3000_XXL'); $(".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');}})