View CSS applied to an element when cursor is hovering over another element

25 views
Skip to first unread message

villa...@gmail.com

unread,
Sep 16, 2013, 1:08:26 PM9/16/13
to fir...@googlegroups.com

Many JavaScript plugins perform some action only when the cursor is hovering over a given element.  For instance, you hover over the names on http://jsbin.com/aCoboQo/1 and a tooltip pops up.

Without editing the JavaScript, how can one view the CSS applied to such an element (i.e. the tooltip) when the cursor is hovering over another element so that the tooltip is visible?

Thanks

Sebastian Zartner

unread,
Sep 17, 2013, 1:44:21 AM9/17/13
to fir...@googlegroups.com
You currently can't disable them automatically. Therefore you should follow issue 551.
Though there's a trick how you can inspect the tooltip. You need to remove the mouseout event listener.
To do so, inspect one of the <span>s that have a tooltip assigned. Then type the following into the Command Line to remove the event listener:

$0.removeEventListener("mouseout", getEventListeners($0).mouseout[0].listener)

Then the tooltip won't disappear anymore when the mouse is moved away from the <span> and you can inspect and edit its styles.
See our wiki for more info on the Command Line APIs $0 and getEventListeners().

Sebastian
Reply all
Reply to author
Forward
0 new messages