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('701203922-003_M'); $(".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');}})