/** * 대한속기협회 메인 스크립트 * * @author WEB Publisher * @since 2021.10.20 **/ $(function() { $("#visual .list_wrap").slick({ dots:true, infinite:true, autoplaySpeed:3000, speed:2000, fade:true, autoplay:true, arrows:false, cssEase:'linear', appendDots:"#visual .ctrl", }); $("#visual .btn_stop").click(function() { if ($(this).hasClass('on') == false ) { $(this).addClass('on'); $(this).text("비주얼 보기 재생"); $("#visual .list_wrap").slick('slickPause'); } else { $(this).removeClass('on'); $(this).text("비주얼 보기 일시정지"); $("#visual .list_wrap").slick('slickPlay'); } return false; }); // 의회소식 var $tab_board=$("#board h4 a"); $("#board .con > li:first").addClass("on"); $tab_board.on("click focus", function(e){ e.preventDefault(); $("#board .con > li").removeClass("on"); $(this).parent().parent("li").addClass("on"); }); // 배너 $("#banner .list_wrap").slick({ dots: false, infinite: true, slidesToShow: 1, autoplay:true, variableWidth:true, nextArrow:"#banner .btn_next", prevArrow:"#banner .btn_prev", responsive: [ { breakpoint:431, settings: { slidesToShow: 2, slidesToScroll:2, variableWidth:false, } }, ] }); $("#banner .btn_stop").click(function() { if ($(this).hasClass('on') == false ) { $(this).addClass('on'); $(this).text("배너보기 재생"); $("#banner .list_wrap").slick('slickPause'); } else { $(this).removeClass('on'); $(this).text("배너보기 일시정지"); $("#banner .list_wrap").slick('slickPlay'); } return false; }); });