I want to give users "updates", via a DIV at the top of the screen. But for them to be able to click an 'X' to close it permanently.
It's kinda like sites do it for "this site uses cookies".
How does it work??
How do I enable a DIV to be removed on click?
Moderator: General Moderators
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
How do I enable a DIV to be removed on click?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: How do I enable a DIV to be removed on click?
You mean like this? http://jsfiddle.net/NzfSJ/
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: How do I enable a DIV to be removed on click?
I do - but does that make it disappear for the whole time you are on the site?
I'm using one *.inc file for tickets. and need to let Support know of developments. but once they know, via that DIV, I want them to be able to click the X, and it's gone permanently. Until I update it again. Or perhaps until they login and create a new session.
Otherwise, if the page was reloaded, would that not reappear?
I'm using one *.inc file for tickets. and need to let Support know of developments. but once they know, via that DIV, I want them to be able to click the X, and it's gone permanently. Until I update it again. Or perhaps until they login and create a new session.
Otherwise, if the page was reloaded, would that not reappear?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: How do I enable a DIV to be removed on click?
Yes, this would reappear on page load. Sounds like what you need is more complex than simply hiding a div, though. You'll need to track what each user has seen. Cookies can handle that temporarily, but you may even want to persist that data so they aren't seeing a bunch of old notices again after having cleared their cache.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: How do I enable a DIV to be removed on click?
Or just abandon telling them. lol.
Thanks.
Thanks.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.