// 메뉴바 그림자 $('#mainNavbar').affix({ offset: { top: 30 } }) jQuery(function ($) { 'use strict'; /* $(window).scroll(function () { if ($(window).scrollTop() <= 3) { $('.v-topbar-w').stop(true, false).slideDown(); } else { $('.v-topbar-w').slideUp("fast"); } }); */ // 스크롤 (function () { $('li a[href*=#]').bind("click", function (e) { var anchor = $(this); $('html, body').stop().animate({ scrollTop: $(anchor.attr('href')).offset().top - 136 }, 1000); e.preventDefault(); }); }()); // 탑가기 (function () { $(window).scroll(function () { if ($(this).scrollTop() > 100) { $('.scroll-up').fadeIn(); } else { $('.scroll-up').fadeOut(); } }); }()); //카카오톡플러스친구 (function () { $(window).scroll(function () { if ($(this).scrollTop() > 100) { $('.kaplus-button').css('bottom', '55px'); } else { $('.kaplus-button').css('bottom', '10px'); } }); }()); // 패럴랙스 (function () { $(window).bind('load', function () { parallaxInit(); }); }()); }); // 토글 $(document).ready(function () { $(".navbar-toggle").on("click", function () { $(this).toggleClass("active"); }); //헤더 상단 스크롤시 지움 (function () { $(window).scroll(function () { if ($(this).scrollTop() > 100) { $('.navbar-header').css('display', 'none'); } else { $('.navbar-header').css('display', 'block'); } }); })(); }); // 스크롤 리비얼 window.sr = ScrollReveal(); sr.reveal('.p-1', { duration: 800, scale: 1, opacity: 0, origin: 'bottom', distance: '100px' }) sr.reveal('.p-2', { duration: 800, scale: 1, opacity: 0, origin: 'right', distance: '43px' }) sr.reveal('.p-3', { duration: 800, scale: 1, opacity: 0, origin: 'left', distance: '43px' });