Jquery selectors in popups

How do I select elements in pop ups using either Jquery or native document.querySelector from the javascript you can add to the popups?

I think these iframes are throwing this off. Thanks