How to debug CSS/Javascript hover issues
Posted
by Jason Creighton
on Stack Overflow
See other posts from Stack Overflow
or by Jason Creighton
Published on 2009-07-03T20:56:56Z
Indexed on
2010/04/21
19:53 UTC
Read the original article
Hit count: 315
I often find myself wanting to debug CSS layout issues that involve DOM changes caused by Javascript in reaction to a hover event or different CSS rules applying due to the :hover selector.
Normally, I'd use Firebug to inspect the element that's giving me trouble and see what its CSS properties were, and where those properties come from. However, when hovering is involved, it becomes impossible, because as soon as you move your mouse down to the Firebug panel, the elements you're interested in are no longer hovered, the CSS rules that apply are different, and (in the case of JS hovers) the DOM is changed.
Is there any way I can "freeze" the state of the DOM and application of :hover in order to inspect the DOM as it was during a hover event?
Any other ideas on how to debug this sort of issue are welcome, of course.
© Stack Overflow or respective owner