jQuery(function($) { // =========================================== // SubMenu active // =========================================== var str = location.href.toLowerCase(); $('.nav-active>li>a').each(function() { if (str.indexOf(this.href.toLowerCase()) > -1) { $(".nav-active>li>a.active").removeClass("active"); $(this).addClass("active"); } }); $('li>a.active').parents().each(function() { if ($(this).is('li>a')) { $(this).addClass("active"); } }); // =========================================== // form mail : style 2 // =========================================== $("#formmail-style-2 input.formmail_border[name='add1']").attr('placeholder', 'name'); $("#formmail-style-2 input.formmail_border[name='add2']").attr('placeholder', 'mail'); $("#formmail-style-2 input.formmail_border[name='add3']").attr('placeholder', 'phone'); $("#formmail-style-2 textarea.formmail_textarea_style[name='description1']").attr('placeholder', 'Describe your project'); // =========================================== // 메뉴바 // =========================================== var lastScrollTop = 0; window.addEventListener("scroll", function(event) { var st = jQuery(this).scrollTop(); if (st > lastScrollTop) { jQuery('#header.sticky-on-scrollup').removeClass('show-sticky-onscroll'); // Down Scroll } else { jQuery('#header.sticky-on-scrollup').addClass('show-sticky-onscroll'); // Up Scroll } lastScrollTop = st; }); }); // =========================================== // 기업형 > 메인 // =========================================== jQuery (function($) { parent.document.querySelector("[name=builder_frame_content]").focus() $("#list_card > li > a").hover(function(){ var bg = $(this).attr('data-background'); $("#section8").css('background-image', 'url('+ bg +')'); }); }); // =========================================== // 기업형 > 사업소개 A // =========================================== jQuery(window).on('pluginCarouselReady', function() { jQuery('#oc-testi').owlCarousel({ items: 1, margin: 25, nav: true, navText: ['⟵', '⟶'], dots: false, responsive: { 576: { items: 1 }, 768: { items: 2 } }, }); }); // =========================================== // 기업형 > 제품소개 B // =========================================== jQuery(document).on("click", "#portfolio .portfolio-item .portfolio-image>a", function() { var is_display = jQuery(this).children(".hover").css("display"); if (is_display == "block") { jQuery(this).children(".hover").stop().fadeOut(); jQuery(this).parent().removeClass('on'); } else { jQuery(".hover").stop().fadeOut(); jQuery(this).children(".hover").stop().fadeToggle(); jQuery(".menu_list>ul>li").removeClass('on'); jQuery(this).parent().addClass('on'); } return false; });