[thelist] how to unset a css pseudo-class by javascript ?

Christian Heilmann codepo8 at gmail.com
Fri Jun 30 05:44:00 CDT 2006


> How will you make B appear on mouseover with javascript off?
> by using a pseudo-class :hover.
> Less abstractly said, I've a tree menu (unordered nested list).
> If I click on a row there is a div appearing with a link to properties
> of  that row.
> that's with javascript on.
> With javascript off, I want it to behave so when the mouse is over the
> row of the tree. This is
> possible with css, with a pseudo-class, with :hover.
> If javascript is on, then I would need to unset that pseudo-class.

Just don't bother with displaying crucial data on hover, think of
people who don't use a mouse, or those who may want to copy and paste
some of the data.

Display the data for javascript off and collapse it when JS is
available showing and hiding it with an onclick handler to allow for
mouse and keyboard access - and all are happy.
-- 
Chris Heilmann
Book: http://www.beginningjavascript.com
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/



More information about the thelist mailing list