1. HTML
팝업 제목
2.script
function fnShowPop(sGetName){ var $layer = $("#"+ sGetName); var mHeight = $layer.find(".m_content").height()/2; $layer.find(".m_content").css({'margin-top':-mHeight}); $layer.addClass("on"); } function fnHidePop(sGetName){ $("#"+ sGetName).removeClass("on"); }
3.css
.modal{position:fixed;width:100%;height:100%;top:0;left:0;bottom:0;background-color:rgba(0,0,0,.8);z-index: -1;opacity:0;transition:all 0.2s;} .modal.on{opacity:1;z-index:999;}
'JavaScript > jQuery' 카테고리의 다른 글
[jQuery] input file 다중 이미지 업로드 (0) | 2019.04.10 |
---|---|
[jQuery] 모바일 햄버거메뉴 스크롤 막기 (0) | 2019.04.02 |
[jQuery] 간단한 image 모달 띄우기 (0) | 2018.07.20 |
[jQuery] 아코디언 메뉴 만들기 (0) | 2018.04.23 |
[jQuery] 체크박스로 활성화,비활성화 제어하기 (0) | 2018.04.18 |