function LogOut() { confirmBox("로그아웃 하시겠습니까?", callBackLogOut, function () { }, ""); $("#modal-window").css("z-index","9999999"); function callBackLogOut(){ var url = "/Main/Logout"; $.ajax({ type: "get" , url: url , cache : false , success: function (data) { if (data.Code == "200") { infoBox(data.Message); location.reload(); } }, error: function (request, status, errorThrown) { errorBox(request.status); } }); } } function LogOn() { var url = "https://auth.hiliving.co.kr/M/Logon?link=/scripts/siteActionJs.aspx?i=2021110802&site_url=http://m.hiliving.co.kr"; location.href = url; } function GoPCVersion() { // 1시간 이후 만료 쿠키 //$.cookie("PC_VERSION_1", "Y", { expires: 1, domain: 'hiliving.co.kr' }); // 창닫을경우 만료 쿠키 //$.cookie("PC_VERSION_2", "Y", { domain: 'hiliving.co.kr' }); location.href = "http://www.hiliving.co.kr?pc_version=1"; } //가격 000단위 점 찍기 ex)100,000원 function moneyFormat(x) { var i, j, y; y = ""; x = String(x); for (i = x.length - 1; i >= 0; i--) { j = x.length - 1 - i; flag = (j + 1) % 3; if ((flag == 0) && (j != x.length - 1)) y = "," + x.charAt(i) + y; else y = x.charAt(i) + y; } return y } //레이어 종료 시 function fade(name) { var name = "." + name; $(name).fadeOut(); $('html, body').css({ 'overflow': 'auto', 'height': '100%' }); //scroll hidden 해제 $('#element').off('scroll touchmove mousewheel'); $('body').off('scroll touchmove mousewheel'); }; //찜하기 삭제하기 $(document).on("click", ".selectdelete", function () { //alert($("#my_id").val()); if ($("#islogin").val() == "False") { $("#my_id").val("1"); } var url = "/Common/CustodyDeleteGroup"; //var data = { custody_id: $(this).parent().parent().parent().parent().parent().find("input[type='checkbox']").val() }; var data = { custody_id: $(this).parent().parent().find("input[type='hidden']").val() }; confirmBox("삭제하시겠습니까?", showajax, function(){}, data) function showajax(data) { $.ajax({ type: "post" , dataType: "json" , async:false , url: url , data: data , success: function (data) { infoBox("삭제하였습니다."); history.go(0); }, error: function (request, error, status) { errorBox(request.responseText) } }); } }); //찜하기 레이어 팝업 취소 클릭 시 $(document).on("click", ".selectclose", function () { $(".window3").fadeOut(); $(".window3").empty(); }); //찜하기 새로운 그룹에 담기 $(document).on("click", "#newaddgroup", function () { var modify_group = $(this).parent().parent().parent().parent().find("#modify_group"); //$("#add_group").show(); $(modify_group).find("span").text("새로운 그룹추가"); $(modify_group).find("h4").text("새로운 그룹을 추가하실 수 있습니다. 원하시는 그룹명을 작성해주세요."); $(modify_group).find(".order_com2").children().find("tbody").find("tr").find("a").text("추가"); $(modify_group).find("#custody_modify_id").val(""); $(modify_group).find("#custody_modify_name").val(""); $(modify_group).css("margin-bottom", "45px"); var s = location.href; $("#back_location").val(s); $(modify_group).show(); //$(this).find("#modify_group").show(); }); // 찜하기 체크박스 클릭 $(document).on("change", "input[name=cc]:checkbox", function () { var checkobject = $(this).parent().find("input[name=cc]"); var boolean = true; if (!$(this).is(":checked")) { boolean = false; } $(this).prop("checked", boolean); }); $(function () { $(".tab_content").hide(); $(".tab_content:first").show(); $("ul.direct_bth li").click(function () { $("ul.direct_bth li").removeClass("active").children('div').css({ 'color':'#333', 'border':'1px solid rgba(0,0,0,0.2)' }); $(this).addClass("active").children('div').css({ 'color':'#ff6723', 'border':'1px solid #ff6723' }); $(".tab_content").hide() var activeTab = $(this).attr("rel"); $("#" + activeTab).fadeIn(); }); $("a.parent_cate").click(function () { var subUl = $(this).parent().find("ul[key=" + $(this).attr("key") + "]"); $(this).parent().parent().find("ul").hide(); $(this).parent().parent().find("ul").removeAttr("active"); $(this).parent().attr('class', 'subtitle'); $(subUl).fadeIn(); $(subUl).attr("active", "active"); $(this).parent().parent().children("li.subtitle").attr('class', 'subtitle'); $(this).parent().attr('class', 'subtitle sub_on'); }); }); function choicelistajax(data) { $.ajaxSettings.traditional = true; $.ajax({ type: "post" , data: { "goodcodes": data } , url: "/Common/ChoiceGoods" , success: function (data) { //레이어 작동 시 스크롤 방지 $('html, body').css({ 'overflow': 'hidden', 'height': '100%' }); // 모달팝업 중 html,body의 scroll을 hidden시킴 //$('body').on('scroll touchmove mousewheel', function (event) { // 터치무브와 마우스휠 스크롤 방지 // event.preventDefault(); // event.stopPropagation(); // return false; //}); $(".window3").empty(); $(".window3").append(data); $('html, .window3').css({ 'overflow': 'auto', 'height': '100%' }); $('.window3').off('scroll touchmove mousewheel'); // 터치무브 및 마우스휠 스크롤 가능 }, error: function (request) { errorBox(request.responseText); } }); } $(document).ready(function () { $("#Hiliving_Main, #EShop_Main, #AutoOrder, #MY, #Customer").append($("#shareLinkLayer").html()); });