I am hoping to limit the event below to once a day per user. This will be a shadowbox that appears when the user tries to leave the page. I don't want to annoy the user with this every time their mouse leaves the body, so it should only happen the first time they are on the site each day.
$('body').one('mouseleave', function() {
$('.shadowbox').fadeIn(400)
});
I have been advised that using a cookie would be a good way to do this, but I am inexperienced in using cookies. Thank you!