You don't even need a div overlay, just attach to the anchor's click handler. Or, if you really want to use an overlay, you simply get the coordinates from the click event, and then find the element at those coordinates. There are various ways to do this, but the easiest is to temporarily hide the overlay, find the element at the click coordinates using document.elementFromPoint() (in supported browsers), and then re-show the overlay element. Then fire click() on the element you found at the click coordinates (if any).