summaryrefslogtreecommitdiff
path: root/minionlivesmatter/templates/assets/jquery/src/css/hiddenVisibleSelectors.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-03-24 17:12:23 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-03-24 17:12:23 +0100
commit54b8482223288a4d5df41267f3c9235bab06c15e (patch)
tree2df9f4e43168ab4fcda02e67740bf9772985eb5a /minionlivesmatter/templates/assets/jquery/src/css/hiddenVisibleSelectors.js
parenta2d5335f18e053c14e8f88efa5f97368777341be (diff)
downloadmeta-54b8482223288a4d5df41267f3c9235bab06c15e.tar.gz
meta-54b8482223288a4d5df41267f3c9235bab06c15e.zip
add minionlivesmatter
Diffstat (limited to 'minionlivesmatter/templates/assets/jquery/src/css/hiddenVisibleSelectors.js')
-rw-r--r--minionlivesmatter/templates/assets/jquery/src/css/hiddenVisibleSelectors.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/minionlivesmatter/templates/assets/jquery/src/css/hiddenVisibleSelectors.js b/minionlivesmatter/templates/assets/jquery/src/css/hiddenVisibleSelectors.js
new file mode 100644
index 0000000..cf0955d
--- /dev/null
+++ b/minionlivesmatter/templates/assets/jquery/src/css/hiddenVisibleSelectors.js
@@ -0,0 +1,18 @@
+define( [
+ "../core",
+ "../selector"
+], function( jQuery ) {
+
+jQuery.expr.filters.hidden = function( elem ) {
+ return !jQuery.expr.filters.visible( elem );
+};
+jQuery.expr.filters.visible = function( elem ) {
+
+ // Support: Opera <= 12.12
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
+ // Use OR instead of AND as the element is not visible if either is true
+ // See tickets #10406 and #13132
+ return elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0;
+};
+
+} );