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

Olivier Percebois-Garve percebois at gmail.com
Fri Jun 30 05:08:01 CDT 2006


Hi
I don't think I'm confused, but maybe my explanation is.
For the moment the script uses onClick, which is what I want.

Basically, the user click  on the div  "A" and the div "B" is appearing. 
If he clicks again on "A", "B" disappears.
That's functioning fine. I want nice degradation, so if javascript is 
off, I want that if the mouse is over "A", "B" appears.
 
If I use such css, I need to disable it, when javascript is on, in order 
to use the preferred way, the onClick.

olivvv


VOLKAN ÖZÇELI.K wrote:
> So I would like to unset a css pseudo-class by javascript in order to
>   
>> replace
>> a :hover behavior with a onClick event.
>>     
>
>
> Can you extend your argument?
>
> I think you are a bit confused; a:hover is much related to onmouseover event
> than onclick event.
>
> So you want to disable the hover pseudo class, then why?
> Enabling a hover pseudoclass in a css file is usable, accessible,
> standards-compliant, future-proof, etc. etc.
>
> HTH,
>   




More information about the thelist mailing list