hardlounge/client/components/jquery/src/css/hiddenVisibleSelectors.js
2014-06-17 17:04:57 +02:00

16 lines
380 B
JavaScript

define([
"../core",
"../selector"
], function( jQuery ) {
jQuery.expr.filters.hidden = function( elem ) {
// Support: Opera <= 12.12
// Opera reports offsetWidths and offsetHeights less than zero on some elements
return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
};
jQuery.expr.filters.visible = function( elem ) {
return !jQuery.expr.filters.hidden( elem );
};
});