jQuery(window).on("load", function() { jQuery('.product_slider_1') .addClass('active') .slick({ autoplay: true, autoplaySpeed: 200, speed: 1500, slidesToShow: 4 }) .removeClass('active'); });