Thanks Klaus and Yehuda, I think I like this better than just checking if
there is a property 'jquery' on the object. That would work too, but
'instanceof' is exactly what I'm checking for.
----- Original Message -----
From: "Klaus Hartl" <klau...@googlemail.com>
To: "jQuery (English)" <jque...@googlegroups.com>
Sent: Wednesday, October 31, 2007 3:06 AM
Subject: [jQuery] Re: Test if object is jQuery object
On 30 Okt., 17:55, "Josh Nathanson" <josh...@gmail.com> wrote:
Is there a cool way to check if an object is a jQuery object as opposed
any other object?
I tried the constructor property but it just says Object(), the same as
Tried typeof, but same deal, just object.
Right now my function can take an object or a jQuery object as an
and all I've figured out is that the jQuery object is indexable
(array-like), so if the object is not jQuery it will return undefined if
say obj. But, this seems like a hack - is there a better way to test