I need the fancybox to display when the cookie has expired, but this does not work? Can anyone help me?
var timer = 1;
$.cookie('popuptimer', 'timer', { expires: 2 * 60 * 1000 });
if($.cookie("popuptimer") == true){
} else {
$.fancybox({
overlayOpacity: 0.8,
overlayColor: '#000',
type: 'iframe',
width: 625,
height: 550,
overflow: 'auto',
padding: 0,
href: '<?php echo base_url(); ?>feedback'
});
}
This solution works even if the user goes to another page (this script has to be on every page).