From 6d8c5080ce53a7bcdb99e428b3e7dbfa2ac6655a Mon Sep 17 00:00:00 2001 From: subsub Date: Wed, 18 Dec 2024 14:17:58 +0900 Subject: [PATCH] =?UTF-8?q?24/12/18=20=EB=B8=8C=EB=9D=BC=EC=9A=B0=EC=A0=80?= =?UTF-8?q?=20=EB=A6=AC=EC=82=AC=EC=9D=B4=EC=A6=88=20=EC=8B=9C=20=ED=8C=9D?= =?UTF-8?q?=EC=97=85=20=EC=9C=84=EC=B9=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/WEB-INF/jsp/web/main/mainPage.jsp | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/web/main/mainPage.jsp b/src/main/webapp/WEB-INF/jsp/web/main/mainPage.jsp index 854e4099..391d475a 100644 --- a/src/main/webapp/WEB-INF/jsp/web/main/mainPage.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/main/mainPage.jsp @@ -31,10 +31,21 @@ $(document).ready(function (){ // 팝업 위치 조정 - let offset = 30; + - var bodyWidth = $("body").width(); + var bdWidth = $("body").width(); + popupSet(bdWidth); +}); + +$(window).on("resize",function(){ + var bdWidth = $("body").width(); + popupSet(bdWidth); +}) + +// 팝업 css 설정 +function popupSet(bodyWidth){ + let offset = 30; if(bodyWidth>1199){ $(".popup").each(function(idx,itm) { $(this).css({ @@ -59,11 +70,7 @@ $(document).ready(function (){ offset += $(this).outerWidth(true)+30; // 다음 팝업의 위치를 현재 팝업의 너비만큼 이동 }); } - - - - -}); +} /* ********************************************************