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; // 다음 팝업의 위치를 현재 팝업의 너비만큼 이동 }); } - - - - -}); +} /* ********************************************************