Inspect element that only appear when other element is mouse overed/entered
Often I want to inspect an element (eg tooltip) that only appears when another element is mouse overed/entered. The element that appears, is made visible via jQuery's mouseenter event.
I can't inspect the tooltip, since the tooltip disappears when my mouse leaves the containing element.
Is there a way to pause JS events so I could hover on the element, then pause the browser's JS, and successfully inspect it?
For an example, try inspecting Twitter bootstrap's tooltips: http://getbootstrap.com/javascript/#tooltips.
It's fairly easy in Chrome 38.0.2094.0.
Here's what it'll look like:
Step-by-step:
If the tooltip shows up because of CSS, here's what you can do in that case:
Step-by-step:
Both Safari's and Chrome's Web Inspector offers checkboxes where you can toggle the :active
, :focus
, :hover
and :visited
state of an element. Using those might be even easier.
Safari:
Chrome:
There's also another tricky way to do it :
Your tooltip will stay visible, you will then be able to inspect it in the Element tab.
Tested on Chrome. Doesn't seem to work on Firefox.
链接地址: http://www.djcxy.com/p/80912.html上一篇: 使用jQuery更改工具提示标题