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