I want the div #topmessage to drop on the second user visit on the site. Also, when the user clicks the #close button, the message will no longer be displayed. I think I should set a cookie and count it, but I donβt know how to do it. I have the following cookie plugin installed with jquery http://plugins.jquery.com/files/jquery.cookie.js.txt
<script type="text/javascript">
jQuery(function($){
$('#topmessage').delay(1000).slideDown(400);
$("#close").click(function(){
$("#topmessage").slideToggle(400);
});
});
</script>
<div id="topmessage">
<a href="#" class="close" id="close">Close</a>
Hi welcome back, if you have any questions please feel free to <a href="/contact">contact me</a>.
</div>
Refresh . The reason I want to do this is to click the div for users who visited the site once and are now returning to a different date. I just don't want to show the div the second time the site is loaded, but it should be at a different date or session. As far as I see, there is no way to access the date the cookie was created?