1

I'm writing some tests for an ASP.Net page with UpdatePanel postbacks. I run the tests from one page (the outer page), and load the page being tested into an iFrame. Then the outer page gets a reference to the tested page's jQuery object on load.

I have a hunch that after an async postback, something funky is happening and the test page's jQuery object is being overwritten, but my outer page's reference to it is not being updated (or vice versa--not sure yet).

I have a reference to a jQuery-wrapped DOM element in the test page. How do I get a reference to the jQuery object used to wrap it so that I can compare it to the jQuery reference my outer page knows about?

EDIT

What I mean is this:

var x = $(foo);
if (someFunc(x) == $) {
    // success!
}

I need to define someFunc().

0

1 Answer 1

2

The jQuery object's constructor property points back to jQuery:

> jQuery().constructor === jQuery
true
Sign up to request clarification or add additional context in comments.

2 Comments

I don't think that's what I mean. Maybe I'm not understanding. I updated my question with an example.
someFunc would be return x.constructor;.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.