1$(document).ready(function() { 2 3 // // íí´ë¦ ê³µíµ 4 $('.tabMenu_normal a , .tabMenu_line a , .tabMenu_basic a').click(function (e){ 5 e.preventDefault(); 6 var parent = $(this).closest('li'); 7 if(!parent.hasClass('on')){ 8 9 var parentUl = $(this).closest('ul'); 10 var clsName = parentUl.prop('class').indexOf('normal') > 1?'tabMenu_normal': ( parentUl.prop('class').indexOf('basic')>0?'tabMenu_basic':'tabMenu_line'); 11 12 //íì¬ ì íëì´ìë íë©ë´ë¥¼ í´ì íë¤. 13 var nowOnMenu = $( '.' + clsName + ' .on'); 14 nowOnMenu.removeClass('on'); 15 $('div[class*="tab0"]').hide(); 16 nowOnMenu.find('a').attr('title' , ''); 17 18 //ê·¸ í íì¬ ì íë íë©ë´ë¥¼ íìíë¤. 19 var myIndex = $('.'+ clsName +' li').index(parent); 20 parent.addClass('on'); 21 $(this).attr('title' , 'ì íë¨'); 22 $('div[class*="tab0'+ (myIndex + 1) +'"]').show(); 23 } 24 }); 25 26 27 // // ë íí¸ ë©ë´ - ì 기/í¼ì¹ê¸° 28 $(document).on("click", ".folding_btn", function () { 29 var $snbTitle = $(".snb-title"); 30 var $snbTitleTxt = $(".snb-title a"); 31 var $menus = $("#snb > .menus"); 32 33 if ($snbTitle.width() > 80) { 34 // ì 기 35 var originalText = $snbTitleTxt.text().trim(); // íì¬ í ì¤í¸ ì ì¥ 36 $snbTitleTxt.data("originalText", originalText); 37 $snbTitle.animate({ width: "80px" }, 300, function () { 38 $snbTitleTxt.html('ë©<br>ë´ <div class="folding_btn"><i class="xi-angle-right"></i></div>'); 39 }); 40 // $menus.animate({ width: "0px" }, 300, function () {$(this).hide();}); 41 $menus.fadeOut(300); // ë©ë´ ì¨ê¸°ê¸° 42 $('#snb').addClass('folding'); 43 $('#right-content > .inner').removeClass('sub-paddingL'); 44 $('#right-content > .inner').addClass('folding_padding'); 45 46 // sub04_0101 íì´ì§ììë§ íì´ì§ë¤ì´ì íì¸ 47 if ($('#right-content').hasClass('sub04_0101')) { 48 setTimeout(function() { 49 checkSwiperPagination(); 50 }, 300); 51 } 52 } else { 53 // í¼ì¹ê¸° 54 var originalText = $snbTitleTxt.data("originalText"); // ìë í ì¤í¸ ê°ì ¸ì¤ê¸° 55 $snbTitle.animate({ width: "260px" }, 300, function () { 56 $snbTitleTxt.html(originalText + ' <div class="folding_btn"><i class="xi-angle-left"></i></div>'); 57 }); 58 // $menus.show().animate({ width: "260px" }, 300); 59 $menus.fadeIn(300); // ë©ë´ ë³´ì´ê¸° 60 $('#snb').removeClass('folding') 61 $('#right-content > .inner').addClass('sub-paddingL'); 62 $('#right-content > .inner').removeClass('folding_padding'); 63 64 // sub04_0101 íì´ì§ììë§ íì´ì§ë¤ì´ì íì¸ 65 if ($('#right-content').hasClass('sub04_0101')) { 66 setTimeout(function() { 67 checkSwiperPagination(); 68 }, 300); 69 } 70 } 71 }); 72 73 // // ë íí¸ ë©ë´ - ë©ë´ 74 $('#snb .depth2_item.hasChild').click(function(){ 75 $('#snb .depth2_item').removeClass('active'); 76 $(this).addClass('active'); 77 }); 78 79 80 // // sub03_0101 ë¶ììë¹ì¤ íí ì´ë¸ 81 $(".tabTable_normal li").click(function () { 82 $(".tabTable_normal li").removeClass("on"); 83 $(this).addClass("on"); 84 }); 85 86 $(".tabTable_normal a").click(function () { 87 var parent1 = $(this).closest("li"); 88 if (!parent1.hasClass("on")) { 89 var parentUl1 = $(this).closest("ul"); 90 var clsName1 = 91 parentUl1.prop("class").indexOf("normal") > 1 92 ? "tabTable_normal" 93 : parentUl1.prop("class").indexOf("basic") > 0 94 ? "tabMenu_basic_cnt" 95 : "tabMenu_line_cnt"; 96 97 //íì¬ ì íëì´ìë íë©ë´ë¥¼ í´ì íë¤. 98 var nowOnMenu1 = $("." + clsName1 + ".on"); 99 nowOnMenu1.removeClass("on"); 100 $('div[class*="tabTable0"]').hide(); 101 nowOnMenu1.find("a").attr("title", ""); 102 103 //ê·¸ í íì¬ ì íë íë©ë´ë¥¼ íìíë¤. 104 var myIndex1 = $("." + clsName1 + " li").index(parent1); 105 parent1.addClass("on"); 106 $(this).attr("title", "ì íë¨"); 107 $('div[class*="tabTable0' + (myIndex1 + 1) + '"]').show(); 108 } 109 }); 110 111 112 113 // // sub02_0201 ëì êµì¡í¬í¸ êµì¡ì ì² ë¦¬ì¤í¸ ëì´ íµì¼ 114 function debounce(func, wait) { 115 let timeout; 116 return function(...args) { 117 clearTimeout(timeout); 118 timeout = setTimeout(() => func.apply(this, args), wait); 119 }; 120 } 121 122 function setEqualHeight() { 123 const techCards = document.querySelectorAll('.sub_cnt_board .smartTech .techCardLi'); 124 let maxHeight = 0; 125 126 // ëì´ ì´ê¸°í (리ì¬ì´ì¦, í ì í ì ë¤ì ê³ì°í기 ìí´) 127 techCards.forEach(card => card.style.height = 'auto'); 128 129 // 모ë ì¹´ëì ëì´ ì¸¡ì 130 techCards.forEach(card => { 131 const height = card.offsetHeight; 132 if (height > maxHeight) { 133 maxHeight = height; 134 } 135 }); 136 137 // 모ë ì¹´ëì ëì¼í ëì´ ì ì© 138 techCards.forEach(card => card.style.height = `${maxHeight}px`); 139 } 140 141 // íì´ì§ ë¡ë ì ì¤í 142 window.addEventListener('load', setEqualHeight); 143
144 // 리ì¬ì´ì¦ë ëë§ë¤ ì¤í (ëë°ì´ì¤ 200ms ì ì©) 145 window.addEventListener('resize', debounce(setEqualHeight, 200)); 146 147 // í í´ë¦ ì ì¤í 148 const tabs = document.querySelectorAll('.sub-tabMenu'); 149 tabs.forEach(tab => { 150 tab.addEventListener('click', () => { 151 setTimeout(setEqualHeight, 50); 152 }); 153 }); 154 155 156 // // sub04_0101 ìì¤ìì ë°ì´í°ì - ê²ì ë°ì¤ ì¬ë¼ì´ë 157 var search_box_swiper = new Swiper('.search_box_swiper', { 158 spaceBetween: 0, 159 slidesPerView: 'auto', 160 loop: false, // 무í ë°ë³µ ë¹íì±í 161 resistanceRatio: 0, // ì¤ìì´í í ë ì쪽 ì¬ë°± ìê² 162 navigation: { 163 nextEl: ".search_box_swiper .btn_next button", 164 prevEl: ".search_box_swiper .btn_prev button", 165 }, 166 pagination: { 167 el: '.search_box_swiper .swiper-pagination', 168 type: 'progressbar', 169 }, 170 on: { 171 init: function() { 172 // swiper ì´ê¸°í íì pagination ìí íì¸ 173 checkSwiperPagination(); 174 }, 175 slideChange: function() { 176 // ì¬ë¼ì´ë ë³ê²½ ì pagination ìí íì¸ 177 checkSwiperPagination(); 178 } 179 } 180 }); 181 182 // ì¤ì ì¬ë¼ì´ëë¤ì width 183 function getActualSlideWidth() { 184 var slides = document.querySelectorAll('.search_box_swiper .swiper-slide'); 185 var totalWidth = 0; 186 187 slides.forEach(function(slide) { 188 totalWidth += slide.offsetWidth; // ê° ì¬ë¼ì´ëì ì¤ì ëë¹ë¥¼ ëí¨ 189 }); 190 191 return totalWidth; 192 } 193 194 function checkSwiperPagination() { 195 // #right-contentì hasSearchForm í´ëì¤ë¥¼ ê°ì§ íì´ì§ììë§ ì¤íëëë¡ ì¡°ê±´ ì¶ê° 196 if (document.querySelector('#right-content.hasSearchForm') || window.location.pathname.includes('hasSearchForm')) { 197 var checkWrap = document.querySelector('#searchForm .search_box_wrap .search_check_wrap'); 198 var boxWrap = document.querySelector('#searchForm .search_box_wrap'); 199 var swiperPagination = document.querySelector('.search_box_swiper .swiper-pagination'); 200 var swiperNavigation = document.querySelector('.search_box_wrap .search_box_swiper_ctrl'); 201 202 var totalSlideWidth = getActualSlideWidth(); // ì¤ì ì¬ë¼ì´ëë¤ì ì´ ëë¹ 203 204 // checkWrapì ëë¹ê° boxWrapì ëë¹ë³´ë¤ í¬ê³ , ì¤ì ì¬ë¼ì´ë ëë¹ê° boxWrapì ëì ë paginationì ë³´ì´ê² í¨ 205 if (totalSlideWidth >
205 boxWrap.offsetWidth + 5) { 206 swiperPagination.style.display = 'block'; 207 swiperNavigation.style.display = 'flex'; 208 document.querySelector('#searchForm .search_box_wrap').classList.add('scrollOn'); 209 } else { 210 swiperPagination.style.display = 'none'; 211 swiperNavigation.style.display = 'none'; 212 document.querySelector('#searchForm .search_box_wrap').classList.remove('scrollOn'); 213 } 214 } 215 } 216 217 // 리ì¬ì´ì¦ ë ë íì´ì§ë¤ì´ì /ë´ë¹ê²ì´ì ìë¡ê³ 침 (ë íí¸ ë©ë´ ì ìë¤ í¼ ëë í´ë¹ ë¶ë¶ js ì ì©) 218 window.addEventListener('resize', function() { 219 if (document.querySelector('#right-content.hasSearchForm') || window.location.pathname.includes('hasSearchForm')) { 220 checkSwiperPagination(); 221 } 222 }); 223 224 225 // // sub04_0301 OPEN-API í 226 // ë¶ëª¨ í í´ë¦ ì´ë²¤í¸ 227 $(".board_tab_normal > li[data-type='parent']").click(function () { 228 $(".board_tab_normal > li[data-type='parent']").removeClass("on"); 229 $(this).addClass("on"); 230 231 // ë¶ëª¨ íì ë§ë ì½í ì¸ íì 232 var parentIndex = "0"+($(".board_tab_normal > li[data-type='parent']").index(this) +1); 233 parentIndex = parentIndex.slice(-2); 234 $('div[class*="board_tab"]').hide(); // 모ë ë¶ëª¨ ì½í ì¸ ì¨ê¸°ê¸° 235 $('div[class*="board_tab' + parentIndex + '"]').show(); // í´ë¹ ë¶ëª¨ ì½í ì¸ ë§ íì 236 }); 237 238 // ë¶ëª¨ í ë´ì a íê·¸ í´ë¦ ì´ë²¤í¸ 239 $(".board_tab_normal a[data-type='parent']").click(function () { 240 var parentLi = $(this).closest("li"); 241 242 if (!parentLi.hasClass("on")) { 243 // íì¬ í´ë¦í a íê·¸ì ì ì²´ li ì¸ë±ì¤ë¥¼ 구íë¤ 244 var allLis = $(".board_tab_normal > li[data-type='parent']"); // ë¶ëª¨ íì lië§ ì í 245 var liIndex = "0"+(allLis.index(parentLi)+1); // í´ë¦í liì ì ì²´ ì¸ë±ì¤ 구í기 246 liIndex = liIndex.slice(-2); 247 248 // íì¬ ì íë íë©ë´ í´ì 249 allLis.removeClass("on"); 250 $('div[class*="board_tab"]').hide(); 251 allLis.find("a").attr("title", ""); 252 253 // í´ë¦í íë©ë´ íì±í 254 parentLi.addClass("on"); 255 $(this).attr("title", "ì íë¨"); 256 257 // í´ë¹ ì¸ë±ì¤ì ë§ë í ì½í ì¸ íì 258 $('div[class*="board_tab' + liIndex + '"]').show(); 259 } 260 }); 261 262 // ìì í í´ë¦ ì´ë²¤í¸ (ìì íìë§ ì ì©) 263 $(".board_tab_normal > li[data-type='child']").click(function () { 264 var parentTabContainer = $(this).closest(".board_tab_normal"); // íì¬ í´ë¦í ìì íì ë¶ëª¨ 컨í ì´ë 265 var childLis = parentTabContainer.find("li[data-type='child']"); // ìì í 그룹 ë´ ëª¨ë li 266 var parentContent = parentTabContainer.closest('div[class*="board_tab"]'); // ë¶ëª¨ 컨í ì¸ ìì 267 268 var liIndex = "0"+(childLis.index(this)+1); // í´ë¦í ìì liì ì¸ë±ì¤ 구í기 269 liIndex = liIndex.slice(-2); 270 271 // íì¬ ì íë ìì íë©ë´ í´ì 272 childLis.removeClass("on"); 273 274 // íì¬ ë¶ëª¨ 컨í ì¸ ìì 모ë ìì 컨í ì¸ ì¨ê¸°ê¸° 275 parentContent.find('div[class*="child_tab"]').hide(); 276 277 // í´ë¦í ìì íë©ë´ íì±í 278 $(this).addClass("on"); 279 280 // íì¬ ë¶ëª¨ 컨í ì¸ ììì ì¸ë±ì¤ì ë§ë ìì í ì½í ì¸ íì 281 parentContent.find('div[class*="child_tab' + liIndex + '"]').show(); 282 }); 283 284 // ë¶ëª¨ í í´ë¦ ì ìì í ìí ì ì§ 285 $(".board_tab_normal > li[data-type='parent']").click(function () { 286 var childLis = $(this).closest(".board_tab_normal").find("li[data-type='child']"); 287 // ë¶ëª¨ íì í´ë¦í ë ìì íì "on" í´ëì¤ë¥¼ ì ì§ 288 childLis.each(function () { 289 if ($(this).hasClass("on")) { 290 $(this).addClass("on"); 291 } 292 }); 293 });
294 295 // nice-select ë³ê²½ ì´ë²¤í¸ 296 $(".board_tab_normal_mob select").on("change", function () { 297 var selectedValue = "0"+$(this).val(); // ì íí ìµì ì ê° ê°ì ¸ì¤ê¸° 298 selectedValue = selectedValue.slice(-2); 299 300 // 모ë í ì½í ì¸ ì¨ê¸°ê¸° (ì ë í¸ ìì ì ì¸) 301 $('div[class*="board_tab"]').not(".board_tab_normal_mob").hide(); 302 303 // ì íí ê°ì í´ë¹íë ì½í ì¸ íì 304 $('div[class*="board_tab' + selectedValue + '"]').show(); 305 }); 306 307 308 309 310 // sub04_0401 ëê°ìë³ì½ë 311 //ë°ê¸ë°©ë² ì¬ë¼ì´ë 312 const swiper = new Swiper('.how_swiper', { 313 speed: 400, 314 spaceBetween: 100, 315 pagination: { 316 el: '.swiper-pagination', 317 type: 'bullets', 318 }, 319 }); 320 321 //íì©ìì í 322 $('#cont05 ul.tab li').click(function () { 323 if(!$(this).hasClass('active')){ 324 var idx = $('#cont05 ul.tab li').index( $(this) ); 325 $('#cont05 ul.tab li.active').removeClass('active'); 326 $(this).addClass('active'); 327 $('#cont05 div[class*="tab_"]').hide(); 328 $('#cont05 div.tab_0' + (idx + 1)).show(); 329 } 330 }) 331 332 333 // ìì½ëì¸ 334 // ì´ê¸° ìíìì .open í´ëì¤ë¥¼ ê°ì§ ìì½ëì¸ì ì´ë ¤ ìì 335 $(".accordionCnt.open").show().removeClass("close"); 336 337 // ìì½ëì¸ ì 목 í´ë¦ ì 338 $(".accordionTit").click(function () { 339 var $currentAccordionCnt = $(this).next(".accordionCnt"); 340 var $currentAccordionSvg = $(this).find(".xi-angle-down"); 341 342 if ($currentAccordionCnt.hasClass("close")) { 343 // íì¬ í´ë¦ë ìì½ëì¸ì ë«ê³ 344 $currentAccordionCnt.slideUp(200).addClass("close"); 345 $currentAccordionSvg.css("transform", "rotate(360deg)"); 346 $(this).removeClass('on'); 347 348 // íì¬ í´ë¦ë ìì½ëì¸ë§ ì´ê¸° 349 $currentAccordionCnt.slideDown(200).removeClass("close"); 350 $currentAccordionSvg.css("transform", "rotate(180deg)"); 351 $(this).addClass('on'); 352 } else { 353 // íì¬ í´ë¦ë ìì½ëì¸ì´ ì´ë ¤ìë¤ë©´ ë«ê¸° 354 $currentAccordionCnt.slideUp(200).addClass("close"); 355 $currentAccordionSvg.css("transform", "rotate(360deg)"); 356 $(this).removeClass('on'); 357 } 358 }); 359 360 361 362 // // sub05_0101 ì´ì©ìë´ - Open API 363 let currentIndex = 0; // íì¬ active ìíê° ì ì©ë ì¸ë±ì¤ 364 const steps = document.querySelectorAll('.stepActiveBox ul li.box'); // li ììë¤ ê°ì ¸ì¤ê¸° 365 366 function activateStep() { 367 // ì´ì ì active ìí를 ì ê±° 368 steps.forEach(step => step.classList.remove('on')); 369 370 // íì¬ ì¸ë±ì¤ì liì on í´ëì¤ë¥¼ ì¶ê° 371 steps[currentIndex]?.classList.add('on'); 372 373 // ììëë¡ ì§íëëë¡ ì¸ë±ì¤ ë³ê²½ 374 currentIndex = (currentIndex + 1) % steps.length;
374 // ë§ì§ë§ ìììì 첫 ë²ì§¸ë¡ ëìê° 375 } 376 377 // 3ì´ë§ë¤ activateStep í¨ì í¸ì¶ 378 setInterval(activateStep, 3000); 379 380 381 382 // // íìê°ì (join_step01) ìë´ì¬í ë«ê¸° 383 $('.join_page .join_caution .btn_list').click(function(){ 384 $('.join_caution').hide(); 385 $('#joinMembership').show(); 386 }) 387 388 389 // // íìê°ì (join_step03) ê¶í ì¤ì 390 $('#rightSelect').change(function() { 391 var selectedValue = $(this).val(); // ì íë ê° ê°ì ¸ì¤ê¸° 392 393 // 모ë í ì´ë¸ì ì¨ê¹ 394 //$('.table-rightSelect').hide(); 395 396 // ì íë ê¶íì ë§ë í ì´ë¸ì ë³´ì¬ì¤ 397 if (selectedValue === '컨ì¤í´í¸') { 398 $('.table-consultant').show(); 399 } else if (selectedValue === 'ëì ê²½ìì²´') { 400 $('.table-agriOrganization').show(); 401 } else if (selectedValue === 'ì°¸ì¬ê¸°ì ') { 402 $('.table-partiCompany').show(); 403 } 404 }); 405 406 //ë°ì´í°ì ì¤ëª on-off 407 $(".expBtn").on("click", function () { 408 $(this).toggleClass("on"); 409 410 if($(this).hasClass("on")){ 411 $("#expDiv").show(); 412 }else{ 413 $("#expDiv").hide(); 414 } 415 }); 416 417 // sub03_0401 ëê°íì©ìë¹ì¤ë 418 $(function () { 419 const $toggleBtn = $('.farmingServicePage .btn_folding'); 420 const $tabs = $('.farmingServicePage .board_tab_normal li'); 421 422 function getActivePanel() { 423 return $('.farmingServicePage .board_tab01:visible, .farmingServicePage .board_tab02:visible').first(); 424 } 425 426 function getItems($panel) { 427 return $panel.find('.farmingService-list > li'); 428 } 429 430 function resetAccordion($panel) { 431 getItems($panel).removeClass('open'); 432 $panel.find('.accordion-content').stop(true, true).slideUp(0); 433 } 434 435 function updateToggleButton(isOpen) { 436 $toggleBtn.toggleClass('on', isOpen).text(isOpen ? 'ì ì²´ ì 기' : 'ì ì²´ í¼ì¹ê¸°'); 437 } 438 439 function checkAllOpen($panel) { 440 const $items = getItems($panel); 441 return $items.length && $items.length === $items.filter('.open').length; 442 } 443 444 $tabs.on('click', function (e) { 445 e.preventDefault(); 446 447 const idx = $(this).index(); 448 449 // í active 450 $(this).addClass('on').siblings().removeClass('on'); 451 452 // í¨ë ì í 453 $('.farmingServicePage .board_tab01, .farmingServicePage .board_tab02').hide().eq(idx).show(); 454 455 // ì í ì§ì ì 무조건 ì´ê¸°í 456 const $activePanel = getActivePanel(); 457 resetAccordion($activePanel); 458 updateToggleButton(false); 459 }); 460 461 $(document).on('click', '.accordion-tit', function () { 462 const $panel = $(this).closest('.farmingServicePage .board_tab01, .farmingServicePage .board_tab02'); 463 const $item = $(this).closest('li'); 464 const $content = $item.find('.accordion-content'); 465 466 $item.toggleClass('open'); 467 $content.stop(true, true).slideToggle(200); 468 469 // ì ë¶ ì´ë¦¬ë©´ ë²í¼ ìë ë³ê²½ 470 updateToggleButton(checkAllOpen($panel)); 471 }); 472 473 $toggleBtn.on('click', function () { 474 const $panel = getActivePanel(); 475 const $items = getItems($panel); 476 const isOpenAll = $(this).hasClass('on'); 477 478 if (isOpenAll) { 479 $items.removeClass('open'); 480 $panel.find('.accordion-content').stop(true, true).slideUp(200); 481 updateToggleButton(false); 482 } else { 483 $items.addClass('open'); 484 $panel.find('.accordion-content').stop(true, true).slideDown(200); 485 updateToggleButton(true); 486 } 487 }); 488 489 resetAccordion(getActivePanel()); 490 updateToggleButton(false); 491 }); 492 493}); //// 494 495
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.