On Tue, Nov 30, 2010 at 4:00 PM, Michael McGinnis <mcsty...@biographiks.com> wrote: > Using Javascript, clicking on a span either shows or hides a div. But I want > to make the span disappear after I click on it. I see that I can style > span:hover and span:active, but not span:visited, since it's not actually a > link. But is there a counterpart or workaround? Or would this be done using > Javascript rather than CSS? > ______________________________________________________________________
I would recommend doing this in the javascript. You should have a pointer to the element handy when processing the click. So it should be easy to set the display for the object which generated the click to none. I believe this will be the proper place to put this feature. If for no other reason it gives you a simple means to set a variable in your javascript to either disappear the span or not. I like to keep my javascript functionality in the javascript. This helps when a user does not have javascript enabled (or is using NoScript addon). Regards, Claude Needham ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/