Execute function / effect after stopping
I am trying to find a way to use jquery without cookies to display a block and click it before hide()
and not show again.
This is a temporary construction div
on my page.
Is there a way to click on it to close, which is easy enough using jQuery and then not load it again? For it won't be on other pages?
0
source to share
1 answer
Load div
with bool variable conditional check. So, in pseudocode:
var HasBeenViewed = false;
If (!HasBeenViewed)
{
show div;
HasBeenViewed = true;
}
Edit: To make it not work on other pages, you would need to use a cookie or some kind of persistence somewhere on the client or server.
+1
source to share