//////////////////////////////////////////////////// //공통 이벤트 //////////////////////////////////////////////////// var url_host = "http://kfoe.or.kr"; var url_ajax = "http://kfoe.or.kr/page/ajax"; var url_theme = url_host + "/theme/bootstrap5-basic"; var url_search_temp = window.location.search.split("="); var url_search = url_search_temp[1]; var url_path = window.location.pathname; var url_page = url_path.split("/").pop(); //$(location).attr('protocol') =>  http: //$(location).attr('host') =>  bellsilver7.tistory.com //$(location).attr('pathname') =>  /main/index.php //$(location).attr('search') =>  ?key=value //urlParams.get('wordid') const tmp_url = $(location).attr('search'); var urlParams = new URLSearchParams( tmp_url ); //$("#main").css("margin-top", $("#header").css("height") ); //이벤트 처리 $(document).ready(function () { if(g5_is_member) { $("#top_blank2").remove(); $("#top_join").remove(); $("#top_login").remove(); if( g5_is_admin != 'super' ) $("#top_admin").remove(); }else{ $("#top_logout").remove(); $("#top_admin").remove(); } //메인 서브메뉴 히든 $("#hd-menu .dropdown-item").removeClass("active"); $("#hd-menu .dropdown-menu").css("top", $("#hd-menu").outerHeight() ); //서브메뉴 스라이딩 쇼 $("#hd-menu .nav-item").hover(function(){ $("#hd-menu .dropdown-menu").css("left", 0 ); $(this).find(".dropdown-menu").stop().slideDown('fast'); }); //서브메뉴 스라이딩 히든 $("#hd-menu .nav-item, #hd-menu .dropdown-menu ").hover(function(){}, function(){ $(this).find(".dropdown-menu").stop().slideUp('fast'); }); //페이지 메뉴 설정 if( urlParams.get("bo_table") ){ const fcase = urlParams.get("bo_table").substring(6); switch(fcase){ case "1" : { $("#page-menu #page_menu1").removeClass("btn-secondary").addClass("btn-primary"); break; } case "2" : { $("#page-menu #page_menu2").removeClass("btn-secondary").addClass("btn-primary"); break; } case "3" : { $("#page-menu #page_menu3").removeClass("btn-secondary").addClass("btn-primary"); break; } } } }); $(window).on('resize', function(){ // $("main").css("margin-top", $("#header").css("height")); }); //////////////////////////////////////////////////// //공통 스크립트 ////////////////////////////////////////////////////