How can I get opener's element with jQuery?

javascript, jquery

Solution

If I understand you correctly, then you simply pass the opener as the second parameter in the jQuery function, like so:

var abc = $("[name=abc]", window.opener.document);

You may also reference the jQuery object directly from the opener, like so:

var abc = window.opener.jQuery("[name=abc]");

Problem

Just like in JavaScript: ``` opener.document.getElementByName ``` jQuery: ?? Is there any way to get `opener`'s element with jQuery?

Original source