This must be something I\'m overlooking, but please look at the following page and JavaScript and tell me why, for everything that\'s holy, jQuery won\'t return true?
<
You can use the jQuery is method.
Description: Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
if (t.is(s)) {
console.log('yes');
}
Example fiddle: http://jsfiddle.net/IrvinDominin/q86Sh/