Skip to content
Permalink
Browse files

Changed the jQuery hidden/visible selectors to be a little more precise.

  • Loading branch information
jeresig committed Feb 16, 2009
1 parent e25c4a1 commit a720bb31ab32c5629607a471e4674fd11e05b97c
Showing with 2 additions and 2 deletions.
  1. +2 −2 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){

0 comments on commit a720bb3

Please sign in to comment.
You can’t perform that action at this time.