1
I use a Jquery code to hide a div, and I would like when clicking close it to save and prevent it from being displayed again to the user when the page is reloaded.
$(document).ready(function() {
$(".info-game--remove").click(function() {
$('#info-game').css("display","none");
});
});
I saw about cookies but do not know how to implement this code,
I’m not sure of the answer, but I believe that using
localStorage
is better and simpler than trying to use cookies. I have no experience with this so I can not offer more details, but the link should already help.– Gabe
I’m building an example of using your case ;)
– Leonardo Bonetti