Answers for "get notify only first visit to website"

1

get notify only first visit to website

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js" integrity="sha512-3j3VU6WC5rPQB4Ld1jnLV7Kd5xr+cq9avvhwqzbH/taCRNURoeEpoPBK9pDyeukwSxwRPJ8fDgvYXd6SkaZ2TA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

// Check If Cookie exists and if it doesn't exists
if( $.cookie('example') == null ) {
    // Create cookie
    $.cookie( 'example', '1',  { expires: 7, path: '/' } );
    // Display popup
    // Your code here...
}
Posted by: Guest on September-23-2021

Browse Popular Code Answers by Language