aboutsummaryrefslogtreecommitdiffstats
path: root/src/css/hiddenVisibleSelectors.js
blob: 1f892dfe007242138f6cfade11833561493373a0 (plain)
1
2
3
4
5
6
7
8
9
10
import jQuery from "../core.js";

import "../selector.js";

jQuery.expr.pseudos.hidden = function( elem ) {
	return !jQuery.expr.pseudos.visible( elem );
};
jQuery.expr.pseudos.visible = function( elem ) {
	return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
};