$(function(){ $(".kp-k12").mCustomScrollbar({ scrollInertia:150 }); /*$(".kp-k13").mCustomScrollbar({ //scrollInertia:150 });*/ $(".kp-k1m").each(function(){ var m = $(this).find(".kp-k12"); var n = $(this).find(".kp-k13"); m.find("li").click(function () { var ulg = n.find("ul").eq($(this).index()).children('li').length; var ulh = (ulg*100)+130; if(ulh>445){ //$(".kp-k13").mCustomScrollbar({scrollInertia:150}); $(".kp-k13").css("overflow-y","scroll"); n.find("ul").eq($(this).index()).height(ulh); }else{ $(".kp-k13").css("overflow","hidden"); } $(this).addClass("on").siblings().removeClass("on"); n.find("ul").eq($(this).index()).show(0).siblings().hide(0); var ulg = ""; var ulh = ""; }) }); $(".kp-k span").click(function () { $(this).addClass("on").siblings().removeClass("on"); var kpk = $(".kp-k1").children(".kp-k1m").eq($(this).index()).find(".kp-k13"); var ulg2 = kpk.children("ul").eq(0).children('li').length; var ulh2 = (ulg2*100)+130; if(ulh2>445){ kpk.css("overflow-y","scroll"); }else{ kpk.css("overflow","hidden"); } $(".kp-k1").children(".kp-k1m").eq($(this).index()).show(0).siblings().hide(0); var ulg2 = ""; var ulh2 = ""; }); $(".kp-m1 span").click(function () { $(this).addClass("on").siblings().removeClass("on"); $(".kp-m").children(".kp-mm").eq($(this).index()).show(0).siblings().hide(0); }); }); var swiperk1 = new Swiper('.swiper-kpl1', { pagination: { el: '.pag-kpl1', clickable: true, }, speed:2000, loop:true, autoplay: { delay: 3000, disableOnInteraction: false, }, }); var swiperk2 = new Swiper('.swiper-kpn', { pagination: { el: '.pag-kpn', clickable: true, }, speed:600, loop:true, slidesPerView:5, navigation: { nextEl: '.pag-net-kpn', prevEl: '.pag-pre-kpn', }, });