Copy
$(document).ready(function(){
$('.main_location_slide').slick({
slidesToShow: 1,
centerPadding: "0",
dots: true,
arrows: true,
centerMode: true,
autoplay: true,
speed: 800,
pauseOnHover: false,
pauseOnFocus: false,
autoplaySpeed: 3000,
responsive: [
{
breakpoint: 1700,
settings: {
centerPadding: "0",
}
},
{
breakpoint: 1600,
settings: {
slidesToShow: 1,
centerPadding: "0",
}
},
{
breakpoint: 1500,
settings: {
slidesToShow: 1,
centerPadding: "0",
}
},
{
breakpoint: 1400,
settings: {
slidesToShow: 1,
centerPadding: "0",
}
},
{
breakpoint: 1300,
settings: {
slidesToShow: 1,
centerPadding: "0",
}
},
{
breakpoint: 1200,
settings: {
slidesToShow: 1,
centerPadding: "0",
}
},
{
breakpoint: 1024,
settings: {
slidesToShow: 1,
centerPadding: "0",
}
},
{
breakpoint: 992,
settings: {
slidesToShow: 1,
centerPadding: "0",
}
}
]
});
var mainlocationSlideLength = $('.main_location_slide .slick-dots li').length,
mainlocationSlideDotsWidth = (1 / mainlocationSlideLength) * 100 + "%";
$('.main_location_slide .slick-dots li').css({
"width": mainlocationSlideDotsWidth
});
$('.main_location_slide').on('breakpoint', function(event, slick){
var mainlocationSlideLength = $('.main_location_slide .slick-dots li').length,
mainlocationSlideDotsWidth = (1 / mainlocationSlideLength) * 100 + "%";
$('.main_location_slide .slick-dots li').css({
"width": mainlocationSlideDotsWidth
});
});
});
현재 슬라이드 형태로 되어 있는데 fade 형태로 바꿀려면 어떻게 해야 하나요?
|
답변 2개
채택된 답변
+20 포인트
3년 전
3년 전
fade 옵션 추가해주시면 됩니다.
fade: true
답변을 작성하려면 로그인이 필요합니다.