$(function(){ m12(); $("header").addClass("on"); var $depth1 = $("#wrap header #nav .gnb > li"); $depth1.mouseleave(function(){ $("header").addClass("on"); }); }); function m12(){ if(!$(".m00").is(".m12")) return; gsap.to('.fix_con .year_progress .bar > span.b1',{ width:'50%', duration: 1, scrollTrigger: { trigger: '.history_wrap .area1', start: 'top top', end:'bottom bottom', scrub:true, }, ease: 'power2.out', }); gsap.to('.fix_con .year_progress .bar > span.b2',{ width:'50%', duration: 1, scrollTrigger: { trigger: '.history_wrap .area2', start: 'top 65%', end:'bottom bottom', scrub:true, }, ease: 'power2.out', }); gsap.to('.fix_con .year_progress .year li.y1',{ opacity:1, duration: 1, scrollTrigger: { trigger: '.history_wrap .area1', start: 'top top', end:'bottom bottom', scrub:true, }, ease: 'power2.out', }); gsap.to('.fix_con .year_progress .year li.y2',{ opacity:1, duration: 1, scrollTrigger: { trigger: '.history_wrap .area2', start: 'top 65%', end:'bottom bottom', scrub:true, }, ease: 'power2.out', }); gsap.to('.fix_con .year_progress .year li.y3',{ opacity:1, duration: 1, scrollTrigger: { trigger: '.history_wrap .area2', start: 'top 50%', end:'bottom bottom', scrub:true, }, ease: 'power2.out', }); }