On Aug 4, 8:26*pm, cwdjrxyz <spamtr...@cwdjr.info> wrote:
> On Aug 4, 1:23*pm, Chris <spam_me_...@goaway.com> wrote:
>
> > Is there a way that I can toggle the visibility of a div on and off
> > using css alone? It's a bit inconvenient in our app to use javascript here.
>
> > Googling around, I found two tricks, neither of which quite does it. One
> > toggles visibility on hover, and the other creates a dummy checkbox,
> > styles it so it doesn't look like a checkbox, and then has different
> > styles for the checked/unchecked states. Clever, but it's hard to use
> > checkboxes like this in our app.
>
> > I'm thinking the challenge here is to maintain state using css alone.
> > Probably not possible, but thought I'd ask.
>
> As others have indicated, it seems you can do this with css alone
> without JavaScript and have your code work as intended on most popular
> current browsers.
>
> If you can use php on your server, it is likely you could do this
> server side with php. It quite often is possible to do the same thing
> with php server side as it is to do it with JavaScript on the browser.
The above should read:
"As others have indicated, it seems you can not do this with css alone
without JavaScript and have your code work as intended on some popular
current browsers." - sorry
> And you usually do not have to worry about the response of different
> browsers and if the viewing browser has script turned on or off. I do
> not know the details of your code, but I have used php to turn
> visibility on and off on some of my pages.
|