lib/client/is_visible.js
function isHidden(element) {

	var parent_styles,
	    overflow_x,
	    overflow_y,
	    overflow,
	    parent = element.parentNode,
	    styles;

	if (!parent) {
		return true;
	}

	// Always return false for the document element
	if (isDocumentElement(parent)) {
		return false;
	}

	// Get the computed styles of the element
	styles = getStyle(element);

	// Return true if the element is invisible
	if (   styles.opacity === '0'
		|| styles.display === 'none'
		|| styles.visibility === 'hidden') {
		return true;
	}

	return isHidden(parent);
}
function isHidden(element) {

	var parent_styles,
	    overflow_x,
	    overflow_y,
	    overflow,
	    parent = element.parentNode,
	    styles;

	if (!parent) {
		return true;
	}

	// Always return false for the document element
	if (isDocumentElement(parent)) {
		return false;
	}

	// Get the computed styles of the element
	styles = getStyle(element);

	// Return true if the element is invisible
	if (   styles.opacity === '0'
		|| styles.display === 'none'
		|| styles.visibility === 'hidden') {
		return true;
	}

	return isHidden(parent);
}
function isHidden ( element ) { var parent_styles , overflow_x , overflow_y , overflow , parent = element . parentNode , styles ; if ( ! parent ) { return true ; } // Always return false for the document element if ( isDocumentElement ( parent ) ) { return false ; } // Get the computed styles of the element styles = getStyle ( element ) ; // Return true if the element is invisible if ( styles . opacity === '0' || styles . display === 'none' || styles . visibility === 'hidden' ) { return true ; } return isHidden ( parent ) ; }
Returns true if the element or its parents
has no opacity, visibility or display

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

@param    {HTMLElement}   element

@return   {Boolean}
Returns true if the element or its parents has no opacity visibility or display