1 2$(function (){ 3 'use strict'; 4 var $window = $(window), 5 $body=$('body'); 6 // gnb 7 $('button.menu-open').on('click',function(){ 8 $('body').toggleClass('gnb-open') ; 9 if ( !$('body').hasClass('gnb-open') ){ 10 closemenu(); 11 } 12 }); 13 14 $('ul.dep1>li').on('click',function(){ 15 var $tg = $(this).find('div'); 16 if ($window.width()<993){ 17 if ($tg.length){ 18 $('ul.dep1>li').find('div').slideUp(0); 19 if (!$(this).hasClass('open')){ 20 $(this).addClass('open') ; 21 $tg.slideToggle( 300, 'linear'); 22 } else { 23 $(this).removeClass('open') ; 24 } 25 } 26 } 27 }); 28 function closemenu(){ 29 $('body').removeClass('gnb-open') ; 30 $('ul.dep1>li').removeClass('open') ; 31 $('ul.dep1>li').find('div').attr('style',''); 32 } 33 // ---------- gnb 34 35 $window.scroll(function(){ 36 scrollSection(); 37 }).trigger('scroll'); 38 39 $window.resize(function(){ 40 if ($window.width() > 992){ 41 closemenu(); 42 } 43 }); 44 45 46 // scroll animation 47 function scrollSection(){ 48 var sT = $window.scrollTop(), 49 wH = $window.height(); 50 $('.ani-sect').each(function(){ 51 var t = $(this), 52 tT = t.offset().top, 53 tH = t.innerHeight(), 54 tD = 0; 55 if(tT-wH<sT-tD){ 56 t.find('.animate__animated').removeClass('ani-stop').addClass('active'); 57 } else { 58 t.find('.animate__animated').addClass('ani-stop').removeClass('active'); 59 } 60 }); 61 } 62 63 $(window).on("load",function(){ 64 var picker = $( ".datepicker" ).length ; 65 if (picker > 0){ 66 $( ".datepicker" ).datepicker({ dateFormat: 'yy-mm-dd' }).val(); 67 } 68 }); 69 70 // ë¹ëì¤ ì¬ì ìµì 71 $('.link-video').click(function(){ 72 var playVid = $(this).children('video')[0]; 73 $(this).addClass('playing'); 74 playVid.play(); 75 playVid.setAttribute('controls','controls'); 76 playVid.addEventListener('ended',function(){ 77 $(this).parent().removeClass('playing'); 78 playVid.removeAttribute('controls'); 79 }); 80 }); 81 $('[class^="swiper-button-"]').click(function(){ 82 $('.link-video video')[0].pause(); 83 $('.link-video video')[0].currentTime = 0; 84 $('.link-video video')[0].removeAttribute('controls'); 85 $('.link-video').removeClass('playing'); 86 }); 87 88});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.