$(document).ready(function(){ //Çì´õ-¾ð¾î ÆäÀÌÁö ¼±Åà $('.language-select').click(function(){ var languageList = $(this).siblings('.language-list'); var icon = $(this).find('.language-select-icon'); if (languageList.is(':visible')) { languageList.hide(); icon.removeClass('rotate180'); } else { $('.language-list').hide(); $('.language-list').css('color','#fff'); $('.language-select-icon').removeClass('rotate180'); languageList.show(); icon.addClass('rotate180'); } }); //Çì´õ nav $('header nav li').click(function(){ $('header').css({ 'background':'#fff', 'color':'#000', 'border-bottom':'1px solid #e1e1e1' }) $('header h1 img').attr('src','/base/img/main/header/logo-bk.png') }); //Çì´õ ¹öÆ° $('#nav-button').click(function() { $(this).toggleClass('active'); if ($(this).hasClass('active')) { $(this).css({ 'background': 'url(/base/img/main/header/close-icon-bk.png) no-repeat', 'background-size': 'cover' }); } else { $(this).css({ 'background': 'url(/base/img/main/header/nav-icon-bk.png) no-repeat', 'background-size': 'cover' }); } $('.side-nav').toggleClass('active'); // Toggle active class on side nav }); //¸ð¹ÙÀÏ ³×ºñ°ÔÀÌ¼Ç $('.side-nav .side-nav-list li').click(function(){ $('.side-nav').removeClass('active'); }); //history,technology °¡·Î ½ºÅ©·Ñ¸µ function scrollableContent(selector) { let isScrolling = false; let startX = 0; let scrollLeft = 0; const scrollableContent = $(selector); scrollableContent.on('mousedown', (e) => { isScrolling = true; startX = e.pageX - scrollableContent.offset().left; scrollLeft = scrollableContent.scrollLeft(); }); scrollableContent.on('mouseup', () => { isScrolling = false; }); scrollableContent.on('mousemove', (e) => { if (!isScrolling) return; e.preventDefault(); const x = e.pageX - scrollableContent.offset().left; const walk = (x - startX) * 1.5; // Adjustable scroll speed scrollableContent.scrollLeft(scrollLeft - walk); }); } // Call the function with the selector for .slide-wrap > ul scrollableContent('#history .slide-con,#technology li'); //¼³Ä¡»ç·Ê ÅÇ $(".case-tab-list").click(function() { // È°¼ºÈ­µÈ ÅÇ Å¬·¡½º Àû¿ë $(".case-tab-list").removeClass("active"); $(this).addClass("active"); // ¸ðµç ÅÇ ³»¿ë ¼û±â±â $(".responsive-2").removeClass("visible"); // Ŭ¸¯ÇÑ ÅÇ¿¡ ÇØ´çÇÏ´Â ³»¿ë Ç¥½Ã var idx = $(this).index(); $(".responsive-2").eq(idx).addClass("visible"); }); $(".case-tab-list").click(function(e) { e.preventDefault(); // Prevent default anchor link behavior // È°¼ºÈ­µÈ ÅÇ Å¬·¡½º Àû¿ë $(".case-tab-list").removeClass("active"); $(this).addClass("active"); // ¸ðµç ÅÇ ³»¿ë ¼û±â±â $(".responsive-2-mb").removeClass("visible"); // Ŭ¸¯ÇÑ ÅÇ¿¡ ÇØ´çÇÏ´Â ³»¿ë Ç¥½Ã var idx = $(this).index(); $(".responsive-2").eq(idx).addClass("visible"); }); //¼³Ä¡¸ð´Þâ $('.inquiry-modal, #quick-modal, #quick-modal-mo').click(function(event){ event.stopPropagation(); // Prevent the click event from propagating to the document/body $('body').addClass('dim'); $('#installModal').show(); $('body').on('scroll touchmove mousewheel', function(event) { event.preventDefault(); event.stopPropagation(); return false; }); }); $(document).on('click', function(event){ if (!$(event.target).closest('#installModal').length && !$(event.target).is('#installModal')) { $('body').removeClass('dim'); $('#installModal').hide(); $('body').off('scroll touchmove mousewheel'); } }); $('.close, #cancel_popup').click(function(){ $('body').removeClass('dim'); $('#installModal').hide(); $('body').off('scroll touchmove mousewheel'); }); //#quick-menu-mo $('#quick-menu-mo button').on('click touchstart', function(event) { $('#quick-menu-mo ul').toggleClass('on'); event.stopPropagation(); event.preventDefault(); }); $(document).on('click touchstart', function(event) { // Check if the clicked element is not the button and outside the ul if (!$(event.target).closest('#quick-menu-mo ul').length && !$(event.target).closest('#quick-menu-mo button').length) { $('#quick-menu-mo ul').removeClass('on'); } }); });//·¹µð ³¡