lib/client/is_visible.js
function isChild(child, parent) {
	while (child = child.parentNode) {
		if (child == parent) {
			return true;
		}
	}

	return false;
}
function isChild(child, parent) {
	while (child = child.parentNode) {
		if (child == parent) {
			return true;
		}
	}

	return false;
}
function isChild ( child , parent ) { while ( child = child . parentNode ) { if ( child == parent ) { return true ; } } return false ; }
Returns true if one element is a child of the other

@author   Jelle De Loecker   <jelle@develry.be>
@since    1.2.2
@version  1.2.2

@param    {HTMLElement}   element

@return   {Boolean}
Returns true if one element is a child of the other