aboutsummaryrefslogtreecommitdiffstats
path: root/src/selector.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2009-02-16 15:55:06 +0000
committerJohn Resig <jeresig@gmail.com>2009-02-16 15:55:06 +0000
commita720bb31ab32c5629607a471e4674fd11e05b97c (patch)
treef98871f98033347edd0634ff289096e7fa92fd20 /src/selector.js
parente25c4a132f9f11cb407605e3ca7d1900ca904077 (diff)
downloadjquery-a720bb31ab32c5629607a471e4674fd11e05b97c.tar.gz
jquery-a720bb31ab32c5629607a471e4674fd11e05b97c.zip
Changed the jQuery hidden/visible selectors to be a little more precise.
Diffstat (limited to 'src/selector.js')
-rw-r--r--src/selector.js4
1 files changed, 2 insertions, 2 deletions
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){