Как мне сделать так чтобы когда мышка уходила от слайдера, то она возвращалась обратно?
Пытался и через mouseover и mouseout и вешал на slisck-dots и на сам слайдер, вообще не реагирует
код
function slick(e) {
var t,
s = '',
o = '';
(null != e && ".js-gallery" != e) ||
$(".js-gallery").each(function () {
var e = $(this),
t = e.find(".js-gallery-slides").not(".slick-initialized"),
s = e.find(".js-gallery-thumbs");
0 != t.length &&
(t.slick({ slidesToShow: 1, slidesToScroll: 1, arrows: !1, fade: !1, infinite: !1, asNavFor: s }),
s.slick({
vertical: !0,
slidesToShow: 4,
slidesToScroll: 1,
asNavFor: t,
arrows: !0,
dots: !3,
focusOnSelect: !0,
mobileFirst: !0,
nextArrow: '',
prevArrow: '',
variableWidth: !0,
infinite: !1,
responsive: [{ breakpoint: 991, settings: { vertical: !0, variableWidth: !1 } }],
}));
}),
// Прокрутка слайдера при навидении на миниатюру
$('.sku__thumbs-item').mouseenter(function (e) {
var btn = $(this);
btn[0].click();
});
(null != e && ".js-slick-other" != e) ||
((t = 0),
$("#popupprod input[name='activelempopup']").val() && (t = parseInt($("#popupprod input[name='activelempopup']").val())),
$(".js-slick-other").slick({ centerMode: !0, slidesToShow: 5, slidesToScroll: 1, initialSlide: t, arrows: !0, fade: !1, mobileFirst: !0, nextArrow: o, prevArrow: s, variableWidth: !0 })),
(null != e && ".js-slick-nav" != e) ||
(991 < screen.width &&
$(".js-slick-nav").slick({
dots: !3,
arrows: !0,
cssEase: "cubic-bezier(0.645, 0.045, 0.355, 1)",
mobileFirst: !0,
nextArrow: '',
prevArrow: '',
})),
(null != e && ".js-slick-slides" != e) ||
$(".js-slick-slides").each(function () {
$(this).slick({
dots: !3,
arrows: !0,
cssEase: "cubic-bezier(0.645, 0.045, 0.355, 1)",
mobileFirst: !0,
nextArrow: '',
prevArrow: '',
});
}),
(null != e && ".js-slick-products" != e) || $(".js-slick-products").not(".slick-initialized").slick({
//dots: !3, arrows: !0, cssEase: "cubic-bezier(0.645, 0.045, 0.355, 1)", mobileFirst: !0, nextArrow: o, prevArrow: s
dots: true,
arrows: true,
cssEase: 'cubic-bezier(0.645, 0.045, 0.355, 1)',
mobileFirst: true,
nextArrow: o,
prevArrow: s
// draggable: false
}),
/*991 < screen.width &&
($(".js-slick-products").mouseover(function () {
$(this).slick("slickSetOption", { speed: 500, autoplaySpeed: 500 }, !1).slick("slickPlay");
}),
$(".js-slick-products").mouseout(function () {
$(this).slick("slickPause");
}));*/
(null != e && ".js-slick-categories" != e) ||
$(window).on("load resize orientationchange", function () {
$(".js-slick-categories").each(function () {
var e = $(this);
768 < $(window).width()
? e.hasClass("slick-initialized") && e.slick("unslick")
: e.hasClass("slick-initialized") ||
e.slick({
slidesToShow: 1,
slidesToScroll: 1,
infinite: !1,
arrows: !1,
dots: !3,
mobileFirst: !0,
variableWidth: !0,
responsive: [
{ breakpoint: 576, settings: { slidesToShow: 2 } },
{ breakpoint: 768, settings: { slidesToShow: 3 } },
],
});
});
}),
(null != e && ".js-slick-category" != e) ||
$(".js-slick-category").slick({
slidesToShow: 1,
slidesToScroll: 1,
infinite: !1,
arrows: !1,
mobileFirst: !0,
variableWidth: !0,
responsive: [
{ breakpoint: 480, settings: { slidesToShow: 2 } },
{ breakpoint: 768, settings: { slidesToShow: 3 } },
{ breakpoint: 992, settings: { slidesToShow: 4 } },
],
}),
(null != e && ".js-slick-article" != e) ||
$(".js-slick-article").slick({
slidesToShow: 1,
slidesToScroll: 1,
infinite: !1,
arrows: !1,
variableWidth: !0,
mobileFirst: !0,
responsive: [
{ breakpoint: 480, settings: { slidesToShow: 2 } },
{ breakpoint: 991, settings: { slidesToShow: 3 } },
{ breakpoint: 1199, settings: { slidesToShow: 4, lazyLoad: "progressive" } },
],
}),
(null != e && ".js-slick-reviews_catalog" != e) || $(".js-slick-reviews_catalog").slick({ slidesToShow: 1, slidesToScroll: 1, infinite: !1, arrows: !0, nextArrow: o, prevArrow: s }),
$(".js-slick-compare").on("init afterChange", function (e, t) {
$.fn.matchHeight._update(),
$(".js-slick-compare-prev, .js-slick-compare-next").removeClass("slick-disabled"),
$(".js-slick-compare").find(".slick-prev").is(".slick-disabled") && $(".js-slick-compare-prev").addClass("slick-disabled"),
$(".js-slick-compare").find(".slick-next").is(".slick-disabled") && $(".js-slick-compare-next").addClass("slick-disabled");
}),
$(window).on("resize", function (e) {
$.fn.matchHeight._update();
}),
(null != e && ".js-slick-compare" != e) || $(".js-slick-compare").slick({ slidesToShow: 2, slidesToScroll: 1, infinite: !1, arrows: !0, mobileFirst: !0, responsive: [{ breakpoint: 768, settings: { slidesToShow: 3 } }] }),
$(document).on("click", ".js-slick-compare-prev", function (e) {
e.preventDefault(), $(".js-slick-compare").slick("slickPrev");
}),
$(document).on("click", ".js-slick-compare-next", function (e) {
e.preventDefault(), $(".js-slick-compare").slick("slickNext");
});
$('.js-slick-products').mouseout(function() {
$('.js-slick-products').slick('slickGoTo', 0, true)
});
});
}