DEV Community

Discussion on: How can we apply pseudo-class on a single line without CSS?

Collapse
 
kallmanation profile image
Nathan Kallman

As in, how in javascript do you detect hover/focus/etc?

There's a whole slew of mouse events (like onmouseover and onmouseleave will trigger for the beginning and ending of a "hover")
w3schools.com/jsref/obj_mouseevent...

Collapse
 
robiabo profile image
Robiabo

Thanks. But you mean by javascript!

Collapse
 
kallmanation profile image
Nathan Kallman

Yes, sorry I thought that's what was meant by "without CSS". Is the question asking for inline styling?