function getScrollTop () { return $(window).scrollTop(); } function checkFixedHeight () { var fixedTotalHeight = null; for (var i=0; i<$(".top-fixed").length; i++) { // 탭메뉴 고정이 된다면 실행 var fixedTotalHeight = fixedTotalHeight + $(".top-fixed").eq(i).outerHeight(); // 고정 탭 메뉴의 height 값을 fixedTotalHeight에 저장 } return fixedTotalHeight; } function getHeaderHeight() { var fixHeader = $("#header").offset().top; return fixHeader; } function moveScrollTop (top, speed) { $("html, body").animate({scrollTop:top}, speed ); } function triggerScrollObject() { $("[data-scroll]").each(function () { var $scrollElem = $(this); var scrollElemOffset = $(this).data("scroll-offset") ? $(this).data("scroll-offset") : startOffset; $scrollElem.waypoint( function (direction) { if (direction === "down") { $scrollElem.addClass("animated"); } else if (direction === "up") { //$scrollElem.removeClass('animated'); } }, { triggerOnce: false, offset: scrollElemOffset, } ); }); }