jQuery( document ).ready(function($){ if ( document.cookie.indexOf( 'visited=true' ) == -1 ){ var number_of_days = 1; // 1 Day var total_of_days = 1000*60*60*24*number_of_days; var expiration = new Date( ( new Date() ).valueOf() + total_of_days ); document.cookie = "visited=true;expires=" + expiration.toUTCString(); } });
Leave a Reply