Discover Popup opener

Discover Popup opener

In Popup.popupbeforeposition(event, ui), how can I tell which A tag was clicked to open the popup?

OR there might be a better way of doing what I'm trying to do-- which is the A tag has information in its Data collection. The popup's content will change slightly based on that data.  Should I pass the data to the popup in a different way?  Perhaps the A's href should be "#popup?data=XXX", instead of $(opener).data("XXX")?