Reputation: 1746
I'm trying to use Firebug to inspect a page element that appears when I hover over a photo.
Problem is, the element's position is dynamically offset from the mouse position, so it's impossible for me to right-click on it to get the "Inspect Element" option.
I had hoped that the onhover element would be inserted into the DOM in a sensible place, but so far, I haven't been able to find it.
Any suggestions?
Upvotes: 2
Views: 3340
Reputation: 3663
If you know where in the DOM the new element will be created (quite often those elements are created as children of the body
element) you can set up a breakpoint for when it is created.
Let's assume that the element will be created as a child of the body
element. You will be able to inspect the element if you follow these steps:
body
elementbody
element and choose Break on Child Addition or Removal
from the popup menuScript execution should then break as soon as the element is created. At that point you will have all the time you need to inspect that dynamically created element, even in the HTML panel.
Upvotes: 3
Reputation: 9331
This isn't an ideal solution, but you could investigate the onhover code to find out more information about the element that's being created. That info might allow you to find it in Firebug's DOM viewer.
Upvotes: 1
Reputation: 939
Can you search for the element using the search bar at the top of the firebug window?
Upvotes: 0