html
클릭할 버튼 or div
<div<div class="filtering clear">
<button type="button" class="tradetype">거래유형</button>
</div>
<section class="tradetype_area samefilter">
보일 내용(닫기, 확인 버튼 등 추가)
</section>
<div class="filtering clear">
<button type="button" class="tradetype">거래유형</button></div>
<section class="tradetype_area samefilter">보일 내용</section>
모양 위치 색은 조절하면 됨
css
.tradetype_area {
visibility: hidden;
opacity: 0;
position: fixed;
width: 90%;
height: auto;
overflow: auto;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 9999;
background: #fff;
padding: 10px 15px;
box-shadow: 0px 0px 0px 100vh rgba(0, 0, 0, 0.7);
}
.tradetype_area { visibility: hidden; opacity: 0; position: fixed; width: 90%; height: auto; overflow: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 9999; background: #fff; padding: 10px 15px; box-shadow: 0px 0px 0px 100vh rgba(0, 0, 0, 0.7); }
js
$(".tradetype").click(function() {
$(".tradetype_area").addClass("on");
$("body").addClass("fixed");
})
$(".btn_close").click(function() {
$("body").removeClass("fixed");
$(".tradetype_area").removeClass("on");
})
$(".tradetype_area .btn_submit_area span").click(function() {
$("body").removeClass("fixed");
$(".tradetype_area").removeClass("on");
})
$(".tradetype").click(function() { $(".tradetype_area").addClass("on"); $("body").addClass("fixed"); }) $(".btn_close").click(function() { $("body").removeClass("fixed"); $(".tradetype_area").removeClass("on"); }) $(".tradetype_area .btn_submit_area span").click(function() { $("body").removeClass("fixed"); $(".tradetype_area").removeClass("on"); })
'퍼블리셔일기' 카테고리의 다른 글
들어가자마자, 페이지 로딩시 레이어팝업창 띄우기 css로만 only css (1) | 2021.02.02 |
---|---|
css 말줄임 처리 (0) | 2021.01.29 |
form submit 해도 repage / return 안되게 하기 (0) | 2021.01.26 |
스와이퍼 모바일에서 다른 사진으로 바꾸기 (0) | 2021.01.21 |
3자리 수마다 콤마 생기게 하기 js [ 1,000 ] (0) | 2021.01.20 |