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

This commit is contained in:
John Resig 2009-02-16 15:55:06 +00:00
parent e25c4a132f
commit a720bb31ab

View file

@ -937,11 +937,11 @@ jQuery.expr = Sizzle.selectors;
jQuery.expr[":"] = jQuery.expr.filters; jQuery.expr[":"] = jQuery.expr.filters;
Sizzle.selectors.filters.hidden = function(elem){ Sizzle.selectors.filters.hidden = function(elem){
return elem.offsetWidth === 0; return elem.offsetWidth === 0 || elem.offsetHeight === 0;
}; };
Sizzle.selectors.filters.visible = function(elem){ Sizzle.selectors.filters.visible = function(elem){
return elem.offsetWidth > 0; return elem.offsetWidth > 0 || elem.offsetHeight > 0;
}; };
Sizzle.selectors.filters.animated = function(elem){ Sizzle.selectors.filters.animated = function(elem){