G5 에서 소스를 참고하여
일반 사이트에서 아래와 같은 팝업 소스를 만들었습니다.
(그누보드는 설치되지 않은상태입니다.)
그런데 팝업은 나오는데 닫기나 24시간 열지않음 이런거는 안됩니다.
혹시 그누보드에서 어떤 함수같은걸 가져와야 하는데 안가져 온건지 봐주세요
Copy
<!-- 팝업레이어 시작 { -->
<div id="hd_pop">
<h2>팝업레이어 알림</h2>
<div id="hd_pops_1" class="hd_pops" style="top:70px;left:10px">
<div class="hd_pops_con" style="width:350px;height:500px">
<p><img title="" alt="" src="/images/popup/test.jpg" ></p> </div>
<div class="hd_pops_footer">
<button class="hd_pops_reject hd_pops_1 24">24시간 동안 열지 않음</button>
<button class="hd_pops_close hd_pops_1">닫기</button>
</div>
</div>
</div>
<script>
$(function() {
$(".hd_pops_reject").click(function() {
var id = $(this).attr('class').split(' ');
var ck_name = id[1];
var exp_time = parseInt(id[2]);
$("#"+id[1]).css("display", "none");
set_cookie(ck_name, 1, exp_time, g5_cookie_domain);
});
$('.hd_pops_close').click(function() {
var idb = $(this).attr('class').split(' ');
$('#'+idb[1]).css('display','none');
});
$("#hd").css("z-index", 1000);
});
</script>
<!-- } 팝업레이어 끝 -->
답변 3개
채택된 답변
+20 포인트
2년 전
세션이나 쿠키를 사용하시기 바랍니다.
https://stackoverflow.com/questions/13154552/how-can-i-set-a-cookie-with-expire-time
여기를 참고 하셔서...쿠키 시간을 조절하시면 됩니다.
2년 전
세션이나 쿠키를 사용하시기 바랍니다.
https://stackoverflow.com/questions/13154552/how-can-i-set-a-cookie-with-expire-time
여기를 참고 하셔서...쿠키 시간을 조절하시면 됩니다.
coDribble
2년 전
set_cookie 함수를 안가져오신 것 같습니다
답변을 작성하려면 로그인이 필요합니다.