How to programmatically detect if an object is a jQuery object?
<p>How can I programmatically detect if an object is a jQuery object? For example:</p>

<pre><code>// 1. declare some variables
var vars = [1, 'hello', ['bye', 3], $(body), { say: 'hi' }];

// 2. ??? : implement function that tests whether its parameter is a jQuery object
function isjQuery(arg) { /* ??? */ }

// 3. profit
var test = $.map(vars, isjQuery); /* expected [ false, false, false, true, false ] */
</code></pre>
