$(function(){ $(".owl-carousel").owlCarousel({ center: false, autoWidth: true, margin:10, stagePadding: 30, loop: false }); $(window).load(function(){ $('.license_slide').bxSlider({ minSlides: 2, maxSlides: 2, moveSlides: 1, slideWidth: 200, slideMargin: 10, infiniteLoop: false, pager: false, controls: true }); /*swW = $(".swiper1 .swiper-wrapper>div").length * $(".swiper1 .swiper-wrapper>div").width(); $(".swiper1 .swiper-wrapper").width(swW); swd = $(".swiper-wrapper>div.on"); swdIndex = swd.index()-2; var swiper1 = new Swiper('.swiper1', { pagination: '.swiper-pagination', slidesPerView: 4, centeredSlides: false, paginationClickable: true, spaceBetween: 0, speed: 500, initialSlide: swdIndex, });*/ }) $(document).ready(function(){ $(".license_slide li").click(function(){ var slideNum = $(this).index()+1; var sectionTop = $(".detail06").offset().top; //alert(sectionTop); $("#bg").fadeIn(); $(".license_pop").css("top", sectionTop).show(); $(".license_pop > img").attr("src", "/m/images/page/license" +slideNum+ ".png") }); $(".license_pop > a.license_close").click(function(){ $("#bg").fadeOut(); $(".license_pop").hide(); }); $(".list2 > div > div > div.owl-item").click(function(){ var subNum = $(this).index()+1; //alert(subNum); $("html, body").animate({ scrollTop: $("#section" + subNum).offset().top - 91 }, 800); }); }); $(window).scroll(function(){ var windowTop = $(window).scrollTop(); var headerHeight = $("header").height(); var subTop = $(".tab").offset().top - 53; var mTop = $(".m00").offset().top - 90; //var sT1 = $("#section1").offset().top; //alert(subTop) if(windowTop > subTop){ $(".tab").addClass("fixed"); }else if(windowTop < mTop){ $(".tab").removeClass("fixed"); }; /*var winScroll = $(this).scrollTop(); var stopPoint = []; var count;*/ }); /*onePageAnchor = function(){ var targetURL = window.location.href; var targetAncher = window.location.hash; var subtab_h = $('header').height(); //alert(targetAncher) if( targetAncher ){ var targetOffset = $(targetAncher).offset(); var targetPos = targetOffset.top; $('html, body').stop().animate({ scrollTop : targetPos-subtab_h-90 }, 800, function(){ var targetOffset = $(targetAncher).offset(); var targetPos = targetOffset.top; var subtab_h = $('header').height(); $('html, body').stop().animate({ scrollTop:targetPos-subtab_h-31 } ,800) }); } }; onePageAnchor();*/ })