1 /1
포토갤러리 정지 포토갤러리 재생
.bbs-thumb-photo .slick-arrow{width: 60px;height: 60px;background-color: rgba(0,0,0,.5);position: absolute;top: 50%;transform: translate(0, -50%);font-size:0;} .bbs-thumb-photo .slick-arrow:before{content:';position:absolute;top:50%;left:50%;transform: translate(-50%, -50%);width:40px;height:40px;background-size:100% !important} .bbs-thumb-photo .slick-arrow.slick-prev{left:0;} .bbs-thumb-photo .slick-arrow.slick-prev:before{background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M10.828 12l4.95 4.95-1.414 1.414L8 12l6.364-6.364 1.414 1.414z' fill='rgba(255,255,255,1)'/%3E%3C/svg%3E");} .bbs-thumb-photo .slick-arrow.slick-next{right:0;} .bbs-thumb-photo .slick-arrow.slick-next:before{background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M13.172 12l-4.95-4.95 1.414-1.414L16 12l-6.364 6.364-1.414-1.414z' fill='rgba(255,255,255,1)'/%3E%3C/svg%3E");} var sliderId = $(".bbs-thumb-photo .slider-for"); var total = Boolean($(sliderId).data("total")); var $pause = $(sliderId).parent().find("[data-control=stop]"); var $play = $(sliderId).parent().find("[data-control=play]"); $play.hide(); $pause.on('click', function() { $pause.hide(); $play.show().focus(); $(sliderId) .slick('slickPause') .slick('slickSetOption', true); }); $play.on('click', function() { $pause.show().focus(); $play.hide(); $(sliderId) .slick('slickPlay') .slick('slickSetOption', true); }); $(sliderId).parent().find('[data-paging]').append(''); $(sliderId).on("init", function(event, _$$slick){ $(sliderId).parent().find('.total').html(''+ parseInt(_$$slick.currentSlide + 1) + ' /' + _$$slick.slideCount +''); }); $(sliderId).on("afterChange", function(event, _$$slick, currentSlide){ $(sliderId).parent().find('.total').html(''+ parseInt(_$$slick.currentSlide + 1) + ' /' + _$$slick.slideCount +''); }); $('.bbs-thumb-photo .slider-for').slick({ slidesToShow: 1, slidesToScroll: 1, arrows: true, fade: true, autoplay: true, autoplaySpeed: 5000, asNavFor: '.bbs-thumb-photo .slider-nav' }); $('.bbs-thumb-photo .slider-nav').slick({ slidesToShow: 5, slidesToScroll: 1, asNavFor: '.bbs-thumb-photo .slider-for', focusOnSelect: true, arrows: true, responsive: [ { breakpoint: 1280, settings: { vertical: false, slidesToShow: 5, slidesToScroll: 1, } }, { breakpoint: 768, settings: { vertical: false, slidesToShow: 3, slidesToScroll: 1, } } ] });