| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- $(function(){
- // gnb
- var w = $("nav").outerWidth();
- var h = $("body").height();
- $("#header #menu").on("click", function(){
- var _top = $(document).scrollTop();
- $("body").css("margin-top",-_top + "px").addClass("fixed");
- $("#contentLayer").fadeIn();
- $("nav").css({"right":-w + "px", "height":h+"px"}).show().animate({"right":"0"}, 500, 'swing');
- });
- $("#contentLayer, nav .close").on("click", function(){
- var _top = $("body").css("margin-top").replace(/[^0-9]/g,'');
- $("nav").animate({"right":-w+"px"}, function(){
- $("nav").hide();
- $(".dim").remove();
- $("nav > ul > li > a").removeClass("on");
- });
- $("#contentLayer").fadeOut();
- $("body").removeClass("fixed").css("margin-top","");
- $("html, body").scrollTop(_top);
- });
- $("nav > ul > li > a").on("click", function(){
- if($(this).hasClass("on")){
- $(this).removeClass("on");
- } else {
- $(this).parent().siblings().find("a").removeClass("on");
- $(this).addClass("on");
- }
- });
- // clause list
- $(".clause_chk_list li div").hide();
- $(".clause_chk_list li:first-child div").show();
- $(".clause_chk_list .detail").click(function(){
- $(this).parent().siblings().find("div").hide();
- $(this).siblings("div").show();
- });
- // input=file
- var fileTarget = $('.filebox .upload-hidden');
- fileTarget.on('change', function(){
- if(window.FileReader){
- var filename = $(this)[0].files[0].name;
- } else {
- var filename = $(this).val().split('/').pop().split('\\').pop();
- }
- $(this).siblings('.upload-name').val(filename);
- });
- // popup close
- $(".layer_popup .close").click(function(){
- $(this).parent().hide();
- $(".dim").remove();
- });
- // business list
- $(".business_list li ul").hide();
- $(".business_list li:first-child ul").show();
- $(".business_list > li > p").click(function(){
- $(this).parent().siblings().find("ul").hide();
- $(this).siblings("ul").show();
- });
- $(".success_confirm > li > p").click(function(){
- // alert($(this).attr("noauth"));
- if($(this).attr("noauth") == undefined){
- if(!$(this).hasClass("on")){
- $(this).parents(".success_confirm").find("li > p").removeClass("on");
- $(this).addClass("on");
- } else {
- $(this).removeClass("on");
- }
- }else{
- alert("먼저 이전 단계 확인바랍니다.");
- }
- });
- // faq
- $(".faq li > p").click(function(){
- $(this).parents(".faq").find(".a").hide();
- $(this).siblings(".a").show();
- });
- });
- // layer pop
- function openLayer(ele){
- var _this = $("."+ele + "_popup");
- var _thisW = _this.outerWidth() / 2;
- var _thisH = _this.height() / 2;
- _this.css('margin-left',-_thisW);
- _this.css('margin-top',-_thisH);
- _this.show();
- $("body").append("<div class='dim'></div>");
- }
- function closeLayer(ele){
- var _this = $("."+ele + "_popup");
- _this.hide();
- $(".dim").remove();
- }
- // layer pop
- function lockLayer(ele){
- var _this = $("#"+ele);
- _this.show();
- $("body").append("<div class='dim'></div>");
- }
- function unlockLayer(ele){
- var _this = $("#"+ele);
- _this.hide();
- $(".dim").remove();
- }
|