Hi folks, i am in the process of implementing JQuery, and taking out Prototype libraries in my codebase, and i am wondering if you could give me the best way to implement this functionality in jQuery. I am familiar with the jQuery ancestor>descendant sntax, but just want to check if an element is a descendant by true of false, like the code below: can someone give me the most efficient jQuery solution for this ? Thanks!
<div id="australopithecus">
<div id="homo-herectus">
<div id="homo-sapiens"></div>
</div>
</div>
$('homo-sapiens').descendantOf('australopithecus');
// -> true
$('homo-herectus').descendantOf('homo-sapiens');
// -> false