Sha256: aa72645aadca9b1a2fe6c4a2a11b9f94a1958e0d36b125190155e19e173193ac

Contents?: true

Size: 999 Bytes

Versions: 400

Compression:

Stored size: 999 Bytes

Contents

define( [
	"../core",
	"../var/document",
	"./support",
	"../selector",
	"../css"
], function( jQuery, document, support ) {

function getDisplay( elem ) {
	return elem.style && elem.style.display || jQuery.css( elem, "display" );
}

function filterHidden( elem ) {

	// Disconnected elements are considered hidden
	if ( !jQuery.contains( elem.ownerDocument || document, elem ) ) {
		return true;
	}
	while ( elem && elem.nodeType === 1 ) {
		if ( getDisplay( elem ) === "none" || elem.type === "hidden" ) {
			return true;
		}
		elem = elem.parentNode;
	}
	return false;
}

jQuery.expr.filters.hidden = function( elem ) {

	// Support: Opera <= 12.12
	// Opera reports offsetWidths and offsetHeights less than zero on some elements
	return support.reliableHiddenOffsets() ?
		( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 &&
			!elem.getClientRects().length ) :
			filterHidden( elem );
};

jQuery.expr.filters.visible = function( elem ) {
	return !jQuery.expr.filters.hidden( elem );
};

} );

Version data entries

400 entries across 400 versions & 1 rubygems

Version Path
govuk_publishing_components-27.14.1 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.14.0 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.13.0 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.12.0 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.11.0 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.10.5 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.10.4 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.10.3 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.10.2 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.10.1 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.10.0 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.9.2 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.9.1 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.9.0 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.8.2 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.8.1 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.8.0 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.7.0 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.6.0 node_modules/jquery/src/css/hiddenVisibleSelectors.js
govuk_publishing_components-27.5.0 node_modules/jquery/src/css/hiddenVisibleSelectors.js