How to check if an element is nested inside another element using JavaScript

visit shbcf.ru