$(function(){ // var fullPage; /*$(document).ready(function() { fullPage = borris.module.fullScroll(); window.fullPage = fullPage; });*/ $('select.form-input').each(function() { var parent = $(this).parent(); $(this).select2({ minimumResultsForSearch: -1, dropdownAutoWidth: true, dropdownParent: parent }); }); $('body').addClass('loaded'); var lastClicked = null; window.onclick = function(e){ e = e || window.event; lastClicked = e.target }; /*$(window).on('beforeunload', function() { $('body').removeClass('loaded'); $('body').addClass('loading'); if(!lastClicked) { $('body').removeClass('loaded'); $('body').addClass('loading'); } else if(lastClicked && lastClicked.href && lastClicked.href.substring(0,4) == 'mail') { $('body').removeClass('loading'); $('body').addClass('loaded'); } else if(lastClicked && lastClicked.href && lastClicked.href.split('/')[4].lastIndexOf('download',0) == 0){ $('body').removeClass('loading'); $('body').addClass('loaded'); } else { $('body').removeClass('loaded'); $('body').addClass('loading'); } }); */ $('.video video').on('loadstart canplay playing', function() { $(window).trigger('resize'); }); var $window = $(window); var $header = $('#header_new'); // var $brand = $('#header .brand'); var $wrapper = $('.wrapper'); var $footer = $('#footer'); var $btnTop = $('#footer .btn-top'); var autoScrolling = false; var lastScrollTop = 0; var autoScrollingDelta = 5; // var navbarHeight = $('#header').outerHeight(); var forceAutoScrolling = false; $(document).on('load', 'img', function(){ $window.trigger('resize'); }); $window.on('resize', function(){ var windowWidth = $window.innerWidth(); var windowHeight = $window.innerHeight(); // var windowScale = windowWidth/windowHeight; /*if(!window.mobileDetect._cache.mobile) { $('.full-page, .full-page .back').css({ 'min-height': Math.max(windowHeight, 640) }); }*/ $('#top').css({ 'min-height': Math.max(windowHeight, 640) }); $('.full-page .bg .video video').each(function(){ var width = $(this).attr('data-width'); var height = $(this).attr('data-height'); width = parseInt(width); height = parseInt(height); var scaleX = windowWidth / width; var scaleY = windowHeight / height; var scale = Math.max(scaleX, scaleY); $(this).css({ 'width': width * scale, 'height': height * scale, }); }); // if($('body').getNiceScroll(0)) $('body').getNiceScroll(0).resize(); $window.trigger('scroll'); }).trigger('resize'); $(window).on('scroll', function() { var windowHeight = $(window).innerHeight(); var scrollTop = $(window).scrollTop(); if ( scrollTop > 0 ) { if ( Math.abs(lastScrollTop - scrollTop) > autoScrollingDelta ) { $('#header_new').removeClass('nav-up').addClass('nav-down'); if ( autoScrolling == false && forceAutoScrolling ) { var scrollToTop = -1; $('.page[data-scroll-to-check="true"]').each(function(){ var offsetTop = $(this).offset().top; if (scrollToTop < 0 && scrollTop > offsetTop - windowHeight * .25 && scrollTop < offsetTop) { scrollToTop = offsetTop; } }); } } lastScrollTop = scrollTop; } }); $(window).on('mousewheel DOMMouseScroll', function(e){ if(autoScrolling) { e.preventDefault(); return false; } }); $window.on('scroll', function(e) { if ($('body').hasClass('modal-opened')) { e.preventDefault(); // if($('body').getNiceScroll(0)) $('body').getNiceScroll(0).locked = true; } // var windowWidth = $window.innerWidth(); var windowHeight = $window.innerHeight(); // var contentHeight = $wrapper.innerHeight(); // var headerHeight = $header.innerHeight(); // var footerHeight = $footer.innerHeight(); var scrollTop = $window.scrollTop(); $('.page-group').each(function() { var pageGroup = $(this); var pageGroupHeight = pageGroup.innerHeight(); var offsetTop = pageGroup.offset().top; if ( offsetTop < scrollTop && offsetTop + pageGroupHeight > scrollTop ) { var hash = '#' + $(this).attr('id'); // if ( window.location.hash != hash ) window.location.hash = hash; } }); var yFactor = .65; $('.full-page').each(function() { var page = $(this); var bg = $('.bg', this); var pageHeight = page.innerHeight(); var offsetTop = page.offset().top; if ( offsetTop - windowHeight <= scrollTop && offsetTop + pageHeight + windowHeight > scrollTop ) { var offset = offsetTop - scrollTop; if ($('.back', bg).hasClass('video')) { var per = -offset / windowHeight * 100 * .6; $('.back', bg).css({ '-webkit-transform': 'translateY(' + per + '%)', 'transform': 'translateY(' + per + '%)', }); } else { if ( pageHeight < windowHeight ) { offset = offsetTop - windowHeight / 2 - scrollTop; } $('.back', bg).css({ 'background-position': '50% ' + (offset * yFactor) + 'px', }); } } }); var headerShrinkingTop = ($('.page#top')[0]) ? windowHeight : 0; if (scrollTop >= headerShrinkingTop ) { $header.addClass('bg-colored'); } else { $header.removeClass('bg-colored'); } if (scrollTop >= headerShrinkingTop ) { $header.addClass('fixed'); } else { $header.removeClass('fixed'); } $btnTop.addClass('active'); if (scrollTop < windowHeight) { $btnTop.removeClass('active'); } }).trigger('scroll'); $('#nav .gnb-menu > li').on('mouseenter', function(e){ $(this).addClass('active').siblings().removeClass('active'); $(this).removeClass('inactive').siblings().addClass('inactive'); }); $('#nav .gnb-menu > li').on('mouseleave', function(e){ $(this).removeClass('active').siblings().removeClass('active'); $(this).removeClass('inactive').siblings().removeClass('inactive'); }); $('.footer-widget-menu .has-sub-menu > a').on('click', function(e){ e.preventDefault(); $(this).closest('li').toggleClass('active'); }) if ($(window).width() < 768){ $(".modal-box-body").removeClass("modal-box-body-noscroll"); } var currentScrollTop = 0; $('.golink').click(function(e) { if($(this).attr('baselink') === location.pathname.replace(/^\//,'')) { var target = $(this).attr('targetlink'); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); currentScrollTop = $(window).scrollTop(); if (target.length) { // fullPage.stop(); window.hideModal('#sitemapModal'); $('#nav').removeClass('active'); /**/ var from = $(window).scrollTop(); var to = $(target).offset().top; var distance = Math.abs(from - to); var duration = Math.min(distance * .7, 2200); autoScrolling = true; $('html, body').stop().animate({'scrollTop': to+1}, duration, 'easeInOutQuint', function() { autoScrolling = false; // fullPage.run(); // fullPage.setLastScrollTop($(window).scrollTop()); }); window.location.hash = this.hash; $(window).scrollTop(currentScrollTop); return false; } } else { location.href = $(this).attr('golink'); } }); //('#nav a[href*="#"]:not([href="#"]), #sitemapModal a[href*="#"]:not([href="#"]), .page-sub-menu a[href*="#"]:not([href="#"]), .page-top .btn-more a').click(function(e) { $('#nav a[href*="#"]:not([href="#"]), #sitemapModal a[href*="#"]:not([href="#"]), .page-top .btn-more a').click(function(e) { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); currentScrollTop = $(window).scrollTop(); if (target.length) { // fullPage.stop(); window.hideModal('#sitemapModal'); $('#nav').removeClass('active'); /**/ var from = $(window).scrollTop(); var to = $(target).offset().top; var distance = Math.abs(from - to); var duration = Math.min(distance * .7, 2200); autoScrolling = true; $('html, body').stop().animate({'scrollTop': to+1}, duration, 'easeInOutQuint', function() { autoScrolling = false; // fullPage.run(); // fullPage.setLastScrollTop($(window).scrollTop()); }); window.location.hash = this.hash; $(window).scrollTop(currentScrollTop); $('body').removeClass('nav-opened'); return false; } } }); $(window).on('hashchange', function(e){ e.preventDefault(); var hash = window.location.hash; var target = $(hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { if ($('#nav').hasClass('active')) $('#nav .btn-close').trigger('click'); } $(window).scrollTop(currentScrollTop); return false; }); $('#footer .btn-top').on('click', function(e){ // fullPage.stop(); e.preventDefault(); var from = $(window).scrollTop(); var to = 0; var distance = Math.abs(from - to); var duration = Math.min(distance * .7, 2200); autoScrolling = true; $('html, body').stop().animate({'scrollTop': to}, duration, 'easeInOutQuint', function(){ // fullPage.run(); autoScrolling = false; // fullPage.setLastScrollTop($(window).scrollTop()); }); }); $('.tab-content-menu > li > a').on('click', function(e) { // fullPage.stop(); e.preventDefault(); $(this).closest('li').addClass('active').siblings().removeClass('active'); $(this).next('.tab-content-sub-menu').find('li:eq(0)').addClass('active').siblings().removeClass('active'); var target = $(this).attr('href'); if(target == '#events_and_filings'){ ireajax(this,'pevent', $('html').attr('lang'), 1, 'hm'); ireajax(this,'uevent', $('html').attr('lang'), 1, 'hm'); irfajax(this, 'filing', $('html').attr('lang'), 1, 'hm'); }else if(target == '#shareholder_letter'){ footDetail(this, 'sl', $('html').attr('lang'), code_r,''); } /**/ $('.tab-content' + target ).addClass('active').siblings().removeClass('active'); $('.m_chat_tab').find('li:eq(0)').addClass('active') var $page = $(this).closest('.page'); autoScrolling = true; $('html,body').stop().animate({'scrollTop': $page.offset().top}, 1000, 'easeInOutQuint', function(){ $(window).trigger('resize'); autoScrolling = false; // fullPage.run(); }); $(window).trigger('resize'); }); $('.tab-content-sub-menu > li > a').on('click', function(e) { // fullPage.stop(); e.preventDefault(); $(this).closest('li').addClass('active').siblings().removeClass('active'); $(this).closest('ul').closest('li').addClass('active').siblings().removeClass('active'); var target = $(this).attr('href'); $('.tab-content' + target ).addClass('active').siblings().removeClass('active'); var $page = $(this).closest('.page'); autoScrolling = true; $('html,body').stop().animate({'scrollTop': $page.offset().top}, 1000, 'easeInOutQuint', function() { // fullPage.run(); $(window).trigger('resize'); autoScrolling = false; }); $(window).trigger('resize'); }); $('.page-top-box .btn-show-video').on('click', function(e){ // fullPage.stop(); e.preventDefault(); var link = $(this).attr('href'); var modal = $('').appendTo('body'); var video = $('').prependTo(modal); video.on('playing', function() { video.addClass('playing'); }); var player = new Plyr('#videoPlayer', { iconUrl: '/img/svg/plyr.svg', }); var videoBg = $('.page#top .bg').find('video'); $('.btn-close', modal).on('click', function(e) { e.preventDefault(); if($(window).width() > 768 ) { videoBg[0].currentTime = video[0].currentTime; videoBg[0].play(); } else { $(".playing").each(function () { this.pause() }); } modal.remove(); $('body').removeClass('modal-opened videoplayer-opened'); $('.wrapper').fadeIn(700); $('body').css('background-color', 'transparent'); // fullPage.run(); }); if ($(this).hasClass('btn-show-video-type-2')) { $('body').addClass('modal-opened videoplayer-opened'); autoScrolling = true; $('html,body').stop().animate({scrollTop:0}, 800, 'easeInOutQuint', function(){ // fullPage.run(); autoScrolling = false; }); setTimeout(function() { modal.addClass('active'); videoBg[0].pause(); video[0].currentTime = videoBg[0].currentTime; video[0].play(); }, 800); } else { $('body').addClass('modal-opened'); $('body').css('background-color', '#000'); $('.wrapper').fadeOut(700, function(){ modal.addClass('active'); // videoBg[0].pause(); // video[0].currentTime = videoBg[0].currentTime; video[0].play(); }); } }); $('.table-tabs a').on('click', function(e) { e.preventDefault(); var target = $(this).attr('href'); $(this).addClass('active').siblings().removeClass('active'); $('.table-tab-content' + target).addClass('active').siblings().removeClass('active'); $window.trigger('resize'); }); }); $(function(){ $(document).on('click', '*[data-modal="show"]', function(e) { e.preventDefault(); var target = $(this).attr('data-modal-target'); window.showModal(target); }); $(document).on('click', '.modal .btn-close', function(e) { e.preventDefault(); $('#portvideo').remove(); var target = '#' + $(this).closest('.modal').attr('id'); window.hideModal(target); }); $(document).on('click', '*[data-modal="hide"]', function(e){ e.preventDefault(); var target = $(this).attr('data-modal-target'); window.showModal(target); }); var preve_scroll_top = 0 window.showModal = function(target) { preve_scroll_top = $(window).scrollTop(); var modal = $('.modal' + target); modal.addClass('active'); $('body').addClass('modal-opened'); // if($('body').getNiceScroll(0)) $('body').getNiceScroll(0).locked = true; $('.modal-box-body:not(.modal-box-body-noscroll), .modal-scroll-area-inner', modal).each(function(){ if($(this).getNiceScroll(0)) { $(this).getNiceScroll(0).resize(); $(this).getNiceScroll(0).doScrollTop(0,1); } }); setTimeout(function() { $(window).trigger('resize'); }, 1000); } window.hideModal = function(target) { var modal = $('.modal' + target).removeClass('active'); $('.youtube-video-player iframe', modal).remove(); if ( $('.modal.active').length == 0 ) { $('body').removeClass('modal-opened'); // if($('body').getNiceScroll(0)) $('body').getNiceScroll(0).locked = false; $(window).trigger('resize'); $(window).scrollTop(preve_scroll_top); } } $(window).trigger('resize'); }); //accordion $(function(){ $('.accordion .accordion-item .accordion-item-body').slideUp(0); $('.accordion .accordion-item.active .accordion-item-body').slideDown(0); $('.accordion .accordion-item a').on('click', function(e) { // e.preventDefault(); $(this).closest('.accordion-item').toggleClass('active'); if ( $(this).closest('.accordion-item').hasClass('active') ) { $(this).closest('.accordion-item').find('.accordion-item-body').stop().slideDown(500, function() { // if($('body').getNiceScroll(0)) $('body').getNiceScroll(0).resize(); }); } else { $(this).closest('.accordion-item').find('.accordion-item-body').stop().slideUp(500, function() { // if($('body').getNiceScroll(0)) $('body').getNiceScroll(0).resize(); }); } }); // console.log($('.accordion .accordion-item.open')); // $('.accordion .accordion-item.open').slideDown(0); }); $(function() { $(window).on('scroll', function(){ var scrollTop = $(window).scrollTop(); if ( $(window).width() > 768 ){ if ( scrollTop > 0 ) { $('.page-content.header-fixed-scroll').each(function(){ var offsetTop = $(this).offset().top; var pageContentHeight = $(this).height(); if ( pageContentHeight > 600 && scrollTop - offsetTop > 0 ) { var splitPageContOffsetTop = $('.split-page-content', this).offset().top; var offsetDiff = splitPageContOffsetTop - offsetTop; var splitPageContentHeight = $('.split-page-content', this).height(); var splitPageHeaderHeight = $('.split-page-content-header-inner', this).height(); var heightDiff = pageContentHeight - splitPageContentHeight -359; var top = (scrollTop) - (offsetTop + heightDiff/2 + splitPageContentHeight - splitPageHeaderHeight); top = Math.max(0, top); $('.split-page-content-header', this).addClass('fixed'); $('.split-page-content-header-inner', this).css({ 'top' : offsetDiff - top }); } else { $('.split-page-content-header', this).removeClass('fixed'); $('.split-page-content-header-inner', this).css({ 'top' : 0 }); } }); } } }); $(window).trigger('resize'); $(window).resize(function(){ if ( $(window).width() > 768 ){ $('.page-content').each(function(){ $('.split-page-content-header', this).removeClass('fixed'); $('.split-page-content-header-inner', this).css({ 'top' : 0 }); }); } }) }); /*cheil*/ $(function(){ $(".btn-nav-toggle").click(function(){ $(".btn-nav-toggle").toggleClass('active'); }); }); $(function(){ /*Òï¨ë컮�� ci �쒖꽌ë³�ê²�*/ if ( $(window).width() < 768 ){ $(".ci-content").each(function(){ $(this).find(".ci-description").insertAfter($(this).find(".ci-image")); }); $(".member-post .members-area").append($(".members")); $(".sitemap-footer .util-menu").insertAfter(".sitemap-footer .social-links"); } /*mobile ×¼붿씤 */ /*�숈쁺��*/ if ( $(window).width() < 768 ){ $("video").each(function () { this.pause() }); }else{ $("video").each(function () { this.play() }); } $(window).resize(function(){ if ( $(window).width() < 768 ){ $("video").each(function () { this.pause() }); }else{ $("video").each(function () { this.play() }); } }); var prevScroll = 0; if ( $(window).width() < 768 ) { $('#investor_relations .tab-content-menu > li > a').on('click', function(e){ e.preventDefault(); var target = $(this).attr('href'); prevScroll = $(window).scrollTop(); $("#investor_relations .split-page-content .split-page-content-body").show(); $('.tab-content' + target ).addClass('active').siblings().removeClass('active'); $('body').addClass('nav-opened'); }); } $( "#investor_relations .split-page-content .split-page-content-body .sub-page-title" ).append("MENU"); $('.btn-nav-toggle, #nav .btn-close').on('click', function(e){ e.preventDefault(); $('#nav').toggleClass('active'); if ( $('#nav').hasClass('active') ) { // $('body').addClass('nav-opened'); } else { // $('body').removeClass('nav-opened'); } }); $('.back_page').on('click', function(){ $("#investor_relations .split-page-content .split-page-content-body").hide(); $(this).closest('.tab-content').removeClass('active'); // $('.tab-content').removeClass('active'); $('body').removeClass('nav-opened'); $(window).scrollTop(prevScroll); }); $('.magazine-item ').on('click', function(){ $(this).addClass('checked'); }); if ( $(window).width() <= 768 ){ $('.btn-show-video').html("PLAY"); } $(window).resize(function(){ if ( $(window).width() <= 768 ){ $('.btn-show-video').html("PLAY"); } }); if ( $(window).width() < 768 ){ $('.portfolio-content-block-header').prepend(""); $('.magazine-filters').prepend(""); $('.search-form').append("ì·¨ì냼"); var search_top = 0 $(".m_search_btn").each(function(){ $(this).click(function(){ var search_top =$(this).closest(".container").offset().top - 30; $(window).scrollTop(search_top); $('.search-form input').focus(); $('.search-form').slideDown(); $('body').addClass('modal_bg'); }); }); $('.search-form input').focusout(function(){ var search_top =$(this).closest(".container").offset().top - 30 $(window).scrollTop(search_top); $('.search-form').slideUp(); $('body').removeClass('modal_bg'); }); $(".search_close").on('click', function(){ $('.search-form').slideUp(); $('body').removeClass('modal_bg'); }); } if ( $(window).width() < 768 ){ $(".career-descriptions li ").each(function(){ $(this).click(function(){ $(this).find('h5').toggleClass('active'); if ( $(this).find('h5').hasClass('active') ) { $(this).find("p").stop().slideDown(); } else { $(this).find("p").stop().slideUp(); } }); }); } if ( $(window).width() < 768 ){ /*���숉듃ë°뺤뒪 �쒓±°*/ $('select.form-input').select2('destroy'); /*IR*/ $('#investor_relations .tab-content').each(function(){ $(this).children().not("h3").wrapAll('
'); }) $('#financial_highlights_1 .position_box , #financial_highlights_2 .position_box').prepend("
"); $('#corporate_governance_1 .position_box , #corporate_governance_2 .position_box , #corporate_governance_3 .position_box , #corporate_governance_4 .position_box').prepend("
"); $('.m_chat_tab ul li').on('click', function(e){ e.preventDefault(); var target = $(this).find('a').attr('href'); var tab = $(this).index(); $('.tab-content' + target ).addClass('active').siblings().removeClass('active'); $('.m_chat_tab ul li').removeClass('active') $('.tab-content' + target ).find('.m_chat_tab li').eq(tab).addClass('active'); }); $('select').each(function(){ $(this).change(function(){ var $selectList = $(this); var $selectedOption = $selectList.children('[value="' + this.value + '"]') .attr('selected', true); var selectedIndex = $selectedOption.index(); var $nonSelectedOptions = $selectList.children().not($selectedOption) .remove() .attr('selected', false); // Reset and calculate new fixed width having only selected option as a child $selectList.width('auto').width($selectList.width()); // Add options back and put selected option in the right place on the list $selectedOption.remove(); $selectList.append($nonSelectedOptions); if (selectedIndex >= $nonSelectedOptions.length) { $selectList.append($selectedOption); } else { $selectList.children().eq(selectedIndex).before($selectedOption); } }); var $selectList = $(this); var $selectedOption = $selectList.children('[value="' + this.value + '"]') .attr('selected', true); var $nonSelectedOptions = $selectList.children().not($selectedOption) .remove() .attr('selected', false); $selectList.width('auto').width($selectList.width()); $selectList.append($nonSelectedOptions); }); } $(".top_menu_box .top_menu_tab").each(function(){ if($(".top_menu_box ").hasClass('cheil_menu_area')){ $(".top_menu_tab").eq(0).show(); }else if ($(".top_menu_box ").hasClass('ideas_menu_area')){ $(".top_menu_tab").eq(1).show(); }else if ($(".top_menu_box ").hasClass('that_menu_area')){ $(".top_menu_tab").eq(2).show(); }else if ($(".top_menu_box ").hasClass('move_menu_area')){ $(".top_menu_tab").eq(3).show(); } }); $("#top .page-top-box-inner h1 a").mouseover(function(){ var btn_num = $("#top .page-top-box-inner h1 a").index(this)+1; $("#top .page-top-box-inner h1 a").removeClass("active"); $(this).addClass("active"); $(".top_menu_tab").hide().eq(btn_num).show(); }); $("#top .page-top-box-inner").mouseleave(function(){ if($(".top_menu_box ").hasClass('cheil_menu_area')){ $(".top_menu_tab").hide().eq(0).show(); }else if ($(".top_menu_box ").hasClass('ideas_menu_area')){ $(".top_menu_tab").hide().eq(1).show(); $("#top .page-top-box-inner h1 a").removeClass("active").eq(0).addClass("active"); }else if ($(".top_menu_box ").hasClass('that_menu_area')){ $(".top_menu_tab").hide().eq(2).show(); $("#top .page-top-box-inner h1 a").removeClass("active").eq(1).addClass("active"); }else if ($(".top_menu_box ").hasClass('move_menu_area')){ $(".top_menu_tab").hide().eq(3).show(); $("#top .page-top-box-inner h1 a").removeClass("active").eq(2).addClass("active"); } }); $('.tab-content-menu02 > li a').mouseover(function(){ $(this).closest('li').addClass('active').siblings().removeClass('active'); $(this).next('.tab-content-sub-menu').find('li:eq(0)').addClass('active').siblings().removeClass('active'); var target = $(this).attr('href'); $('.tab-content' + target ).addClass('active').siblings().removeClass('active'); var $page = $(this).closest('.page'); $(this).click(function() { // window.fullPage.stop(); autoScrolling = true; $('html,body').stop().animate({'scrollTop': $page.offset().top}, 1000, 'easeInOutQuint', function(){ // window.fullPage.run(); $(window).trigger('resize'); autoScrolling = false; }); }); }); $('.balink').click(function() { return false; }); $('.global-parentMenu').click(function(e) { $(this).closest('li').find('div').toggleClass('on'); e.stopPropagation(); }); $(window).click(function(){ if($('.global-subMenu-over').hasClass('on')) $('.global-subMenu-over').removeClass('on'); if($('.global-subMenu').hasClass('on')) $('.global-subMenu').removeClass('on'); }); $('.gnb-sub-menu').click(function() { var linkPath = $(this).attr('link'), curPath = location.href.replace(/(https?):\/\/([^:\/\s]+)(:([^\/]*))?/gi, '').substring(1); var linkPaths = linkPath.split('#'), curPaths = curPath.split('#'), linkUrlPath = linkPaths[0].split('/'), curUrlPath = curPaths[0].split('/'), linkServicePath = (linkUrlPath.length > 1) ? linkUrlPath[1] : '', curServicePath = (curUrlPath.length > 1) ? curUrlPath[1] : '' // �숈씪�섏씠×Ù� Òú´í겕 ë¡쒖쭅 if(linkServicePath === curServicePath) { var target = $('#' + linkPaths[1]); autoScrolling = true; $('#nav').removeClass('active'); $('html,body').stop().animate({'scrollTop': target.offset().top}, 1000, 'easeInOutQuint', function(){ $(window).trigger('resize'); autoScrolling = false; // fullPage.run(); }); $('body').removeClass('nav-opened'); } else { // �섏씠×Ù� go location.href = '/' + linkPath; } }); }); $("#magazines").scroll( function() { var elem = $("#magazines"); if ( elem[0].scrollHeight - elem.scrollTop() == elem.outerHeight()) { alert("End of Yellow"); } });