From a720bb31ab32c5629607a471e4674fd11e05b97c Mon Sep 17 00:00:00 2001 From: John Resig Date: Mon, 16 Feb 2009 15:55:06 +0000 Subject: Changed the jQuery hidden/visible selectors to be a little more precise. --- src/selector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/selector.js') diff --git a/src/selector.js b/src/selector.js index 7ad7a8ec0..69ea36cd9 100644 --- a/src/selector.js +++ b/src/selector.js @@ -937,11 +937,11 @@ jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.filters; Sizzle.selectors.filters.hidden = function(elem){ - return elem.offsetWidth === 0; + return elem.offsetWidth === 0 || elem.offsetHeight === 0; }; Sizzle.selectors.filters.visible = function(elem){ - return elem.offsetWidth > 0; + return elem.offsetWidth > 0 || elem.offsetHeight > 0; }; Sizzle.selectors.filters.animated = function(elem){ -- cgit v1.2.3