|
.isParent( child )
.isParent() will check whether the source element is a parent of provided child element.
Parameters
Returns
Example 1
This example checks whether #parent div is a parent of #child div.
JS
HTML
$.domLoaded(function() {
var child = $.get("#child");
//check #parent isParent of #child
if($.get("#parent").isParent(child)) {
console.log("Parent");
} else {
console.log("Not a Parent");
}
});
});
| |||||||||||||||
