Set a jQuery cookie to show popup only once

后端 未结 6 539
野性不改
野性不改 2020-12-14 02:36

I\'m an absolute newbie in jQuery. I\'m learning, but there is a Christmas message that I need to get up and running within no time.

I\'ve included these in the head

6条回答
  •  失恋的感觉
    2020-12-14 03:28

    Something of this kind might be of help:

    $(document).ready(function(){
       if ($.cookie('test_status') != '1') {
        //show popup here
        $.cookie('test_status', '1', { expires: 60}); }
       });
    

提交回复
热议问题