I have added some code to my website but just can't fiqure out how to add cookie functionality This is the code so far:
<script type="text/javascript">
$(document).ready(function () {
$.fancybox('<p class="msgAlert">The following pictures contain nudity. <br />If you are not allowed or willing to watch such content please leave this page.<p><a href="javascript:void(0);" id="do_accept" class="button butgreen">Yes I Accept</a></p></p>', {
closeBtn: false,
closeClick: false,
helpers: {
overlay: {
css: {
'background': 'rgba(0, 0, 0, 0.9)'
}
}
}
});
$("body").on("click", "#do_accept", function () {
$.fancybox.close();
});
$("body").on("click", ".fancybox-overlay", function () {
window.location.href = "index.php";
});
});
</script>
I can't add php code so I need some advice. The idea ist to have a 10 day cookie in order to show the message just once every 10 days. Here's the link: https://www.olafernst.com/photo/gallerynudes.html Thanks a lot