function runAfterElementExists(jquery_selector, callback) {var checker = window.setInterval(function() {if ($(jquery_selector).length) {clearInterval(checker);callback();}}, 200);} var ArtNr = $('.variationID').html(); $('input[name="variationid"]').val('612-10-0228-white-8'); $(".ItemQuestionForm form > input[data-mail='subject']").val("Artikel-Nummer: " + ArtNr);$('.ItemQuestionForm input[name="Artikelnr."]').attr('disabled', 'disabled').val(ArtNr); runAfterElementExists('.slider-for', function() {$('.slider-for').slick({slidesToShow: 1,slidesToScroll: 1,arrows: true,infinite: false,fade: true,asNavFor: '.slider-nav'}); $('.slider-nav').slick({slidesToShow: 6,slidesToScroll: 1,asNavFor: '.slider-for',dots: true,arrows: false,centerMode: false,focusOnSelect: true });});runAfterElementExists('.slider-for', function() {window.CI360.init();});