Hide elements for current visit only

Posted by deanloh on Stack Overflow See other posts from Stack Overflow or by deanloh
Published on 2010-06-02T14:40:35Z Indexed on 2010/06/02 14:43 UTC
Read the original article Hit count: 189

Filed under:

I need to display a banner that sticks to the bottom of the browser. So I used these codes:

$(document).ready(function(){
  $('#footie').css('display','block');
  $('#footie').hide().slideDown('slow');
  $('#footie_close').click(function(){
    $('#footie_close').hide();
    $('#footie').slideUp('slow'); 
  }); 
});

And here's the HTML:

<div id="footie">
  {banner here}
  <a id="footie_close">Close</a>
</div>

I added the close link there to let user have the option to close the banner. How ever, when user navigates to next page, the banner shows up again. What can I do to set the banner to remained hidden just for this visit? In other words, as long as the browser remained open, the banner will not show up again. But if user returns to the same website another time, the banner should load again.

Thanks in advance for any help!

© Stack Overflow or respective owner

Related posts about jQuery