As of jQuery 1.6, you can determine if a jquery object is a child of another jquery object this way:
element2.is(element1.children());
Also noteworthy, since is() now accepts several different arguments (the first argument can be a function, a jQuery selector, or a DOM element), you cannot think of it simply as "is", but rather of whether it is or is in ".
Donamite Sep 21 '11 at 20:28 2011-09-21 20:28
source share