diff --git a/src/main/webapp/css/media.css b/src/main/webapp/css/media.css index f8689528..3e31357a 100644 --- a/src/main/webapp/css/media.css +++ b/src/main/webapp/css/media.css @@ -617,8 +617,9 @@ a.pop-logo img { margin-right: 10px; } .faq .inner .tab { width: 100%; } .faq .mo_tabs_wrap { padding-left: 16px; box-sizing: border-box; height: 56px; } .faq .inner .tab_content {margin-top:0px;} - .faq .inner .tabs { /*width: max-content;*/ display: flex;white-space:nowrap;overflow-y:hidden;overflow-x:auto;text-align:center;height:50px; } + .faq .inner .tabs { /*width: max-content;*/ /*display: flex;*/white-space:nowrap;overflow-y:hidden;overflow-x:auto;text-align:center;height:50px;width:100%; } .faq .inner .tabs li { width: 130px; } + .faq .inner .tabs li.current::before {bottom: calc(0% - 4px);} .faq .inner .tabs li a { border-radius: 0;font-size:13px; } .faq .inner .tabs li:first-child a { border-top-left-radius: 3px; border-bottom-left-radius: 3px; } .faq .inner .tabs li:last-child a { border-top-right-radius: 3px; border-bottom-right-radius: 3px; } diff --git a/src/main/webapp/js/default.js b/src/main/webapp/js/default.js index e120361c..6078d8bd 100644 --- a/src/main/webapp/js/default.js +++ b/src/main/webapp/js/default.js @@ -18,6 +18,27 @@ $(document).ready(function(){ } }); + /* 인기자료 탭메뉴 */ + (function ($) { + $(".tab ul.tabs").addClass("active").find("> li:eq(0)").addClass("current"); + $(".tab ul.tabs li a").click(function (g) { + var tab = $(this).closest(".tab"), + index = $(this).closest("li").index(); + + tab.find("ul.tabs > li").removeClass("current"); + $(this).closest("li").addClass("current"); + + tab.find(".tab_content") + .find("div.tabs_item") + .not("div.tabs_item:eq(" + index + ")") + .hide(); + tab.find(".tab_content") + .find("div.tabs_item:eq(" + index + ")") + .show(); + g.preventDefault(); + }); + })(jQuery); + /* 푸터 관련사이트 */ $(".family_site").click(function(){ $(this).toggleClass("on");