tags:

views:

104

answers:

2

Hey all,

I am trying to find a way using jquery without cookies to display a block and click it to hide() and not show again.

It is a temporary under construction div on my page.

Is there anyway to click it to close, which is easy enough using jQuery, then not have it load again? For it won't on the other pages?

Thanks,

Ryan

+1  A: 

Load the div with a conditional check of a bool variable. So in pseudocode:

var HasBeenViewed = false;

If (!HasBeenViewed) { show div; HasBeenViewed = true; }

Edit: for it not to work on other pages you would need to use a cookie or some sort of state persistence somewhere, either on the client or the server.

flesh
A: 

Thank you for your reply! I found a and easy cookie jquery plugin, seems easy to use.

Thanks again,

Ryan

Coughlin