I have a JS function that shows a message div on doc ready and then hides it if the 'close' link is clicked.
I would like to show this message div only once per visit to the first page the user visits and then then never for any page view in the site after that.
At the moment when a user clicks on another page within the site, the message div shows again and this is annoying obviously for everyone.
I looked up 'one' in jQuery but am not sure how to implement it with my low JS knowledge.
<script>
$(document).ready(function(){
$("div#panel").hide();
var autoTimer = null;
autoTimer = setTimeout(function(){
$("div#panel").slideDown("slow");
},1000);
$("#close").click(function(){
$("div#panel").slideUp("slow");
if(autoTimer) clearTimeout(autoTimer);
autoTimer = null;
$("div#close").css("display","none");
});
});
</script>