[jQuery] Re: Test if object is jQuery object

2007-10-31 Thread Josh Nathanson
- From: "Klaus Hartl" <[EMAIL PROTECTED]> To: "jQuery (English)" Sent: Wednesday, October 31, 2007 3:06 AM Subject: [jQuery] Re: Test if object is jQuery object On 30 Okt., 17:55, "Josh Nathanson" <[EMAIL PROTECTED]> wrote: Is there a cool way

[jQuery] Re: Test if object is jQuery object

2007-10-31 Thread Klaus Hartl
On 30 Okt., 17:55, "Josh Nathanson" <[EMAIL PROTECTED]> wrote: > Is there a cool way to check if an object is a jQuery object as opposed to > any other object? > > I tried the constructor property but it just says Object(), the same as any > other object. > > Tried typeof, but same deal, just obje

[jQuery] Re: Test if object is jQuery object

2007-10-30 Thread Yehuda Katz
Another option would be obj instanceof $ On 10/30/07, Josh Nathanson <[EMAIL PROTECTED]> wrote: > > > > if (obj.jquery) { > > // it is a jquery object - jquery holds the version > > } > > else { > > // not a jquery object > > } > > > > Thanks Eric and Wizzud, that's what I was looking for. Much

[jQuery] Re: Test if object is jQuery object

2007-10-30 Thread Josh Nathanson
if (obj.jquery) { // it is a jquery object - jquery holds the version } else { // not a jquery object } Thanks Eric and Wizzud, that's what I was looking for. Much better than what I was doing. -- Josh

[jQuery] Re: Test if object is jQuery object

2007-10-30 Thread Eric Martin
On Oct 30, 9:55 am, "Josh Nathanson" <[EMAIL PROTECTED]> wrote: > Is there a cool way to check if an object is a jQuery object as opposed to > any other object? > > I tried the constructor property but it just says Object(), the same as any > other object. > > Tried typeof, but same deal, just obj

[jQuery] Re: Test if object is jQuery object

2007-10-30 Thread Wizzud
Try ... if(Object.jquery){ ; // it's (probably) a jQuery object }else{ ; // it's not } On Oct 30, 4:55 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote: > Is there a cool way to check if an object is a jQuery object as opposed to > any other object? > > I tried the constructor property but it