Skip to content

Commit a720bb3

Browse files
committed
Changed the jQuery hidden/visible selectors to be a little more precise.
1 parent e25c4a1 commit a720bb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/selector.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,11 +937,11 @@ jQuery.expr = Sizzle.selectors;
937937
jQuery.expr[":"] = jQuery.expr.filters;
938938

939939
Sizzle.selectors.filters.hidden = function(elem){
940-
return elem.offsetWidth === 0;
940+
return elem.offsetWidth === 0 || elem.offsetHeight === 0;
941941
};
942942

943943
Sizzle.selectors.filters.visible = function(elem){
944-
return elem.offsetWidth > 0;
944+
return elem.offsetWidth > 0 || elem.offsetHeight > 0;
945945
};
946946

947947
Sizzle.selectors.filters.animated = function(elem){

0 commit comments

Comments
 (0)