팝업창 소스좀 봐주세요

팝업창 소스좀 봐주세요

QA

팝업창 소스좀 봐주세요

답변 3

본문

G5 에서 소스를 참고하여
일반 사이트에서 아래와 같은 팝업 소스를 만들었습니다.
(그누보드는 설치되지 않은상태입니다.)

 

그런데 팝업은 나오는데 닫기나 24시간 열지않음 이런거는 안됩니다.

 

혹시 그누보드에서 어떤 함수같은걸 가져와야 하는데 안가져 온건지 봐주세요

 


 

<!-- 팝업레이어 시작 { -->
  <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

세션이나 쿠키를 사용하시기 바랍니다.

 

https://stackoverflow.com/questions/13154552/how-can-i-set-a-cookie-with-expire-time

 

여기를 참고 하셔서...쿠키 시간을 조절하시면 됩니다.

세션이나 쿠키를 사용하시기 바랍니다.

 

https://stackoverflow.com/questions/13154552/how-can-i-set-a-cookie-with-expire-time

 

여기를 참고 하셔서...쿠키 시간을 조절하시면 됩니다.

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 124,056
© SIRSOFT
현재 페이지 제일 처음으로