I want to sniff the color which a link would become if I hovered over it without actually hovering over it. The reason I want to do this is so I know what to change it back to using animate as the colour can be set via various skins which would be applied dynamically. Can I do this using javascript or jquery ( or is there any other way to do it ) ?
Edit: I already have implemented this using CSS transitions but I need the javascript for IE9 and below
No, this isn't possible unfortunately: you can use getComputedStyle() to retrieve information about pseudo-elements (::before/::after), but not the :hover pseudo-selector.
References:
window.getComputedStyle() compatibility.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With