$(function () { var swiper = new Swiper('.modular1 .swiper-container', { pagination: '.swiper-pagination', slidesPerView: 3, paginationClickable: true, spaceBetween: 30, nextButton: '.modular1 .swiper-next', prevButton: '.modular1 .swiper-prev', breakpoints: { 768: { slidesPerView: 1, spaceBetween: 20 } } }); var swiper = new Swiper('.modular3 .swiper-container', { pagination: '.swiper-pagination', slidesPerView: 2, paginationClickable: true, spaceBetween: 30, nextButton: '.modular3 .swiper-next', prevButton: '.modular3 .swiper-prev', breakpoints: { 768: { slidesPerView: 1, spaceBetween: 20 } } }); $(document).on('click', '.modular3 .swiper-slide', function () { $('.pop-up .body').html(''); $('.pop-up').addClass('on'); }) $(document).on('click', '.pop-up .content', function (event) { event.stopPropagation(); }) $(document).on('click', '.pop-up .close,.pop-up', function () { $('.pop-up').removeClass('on'); }) newsTop(); ScrollText($('.news-top dd p')) }) function getL1Add0(a) { if (a.toString().length == 1) { return '0' + a; } return a; } function newsTop() { if ($(".news-top .swiper-container").length > 0) { var swiper = new Swiper('.news-top .swiper-container', { pagination: '.news-top .swiper-pagination', nextButton: '.news-top .swiper-next', prevButton: '.news-top .swiper-prev', paginationClickable: true, loop: true, paginationType: 'custom', paginationCustomRender: function (swiper, current, total) { console.log(getL1Add0(current)); return '
' + getL1Add0(current) + ' / ' + getL1Add0(total) + '
' + ''; } }); } }