]> source.dussan.org Git - jquery-ui.git/commitdiff
Core: Optimized isVisible() for the case where the element being checked is not visible.
authorScott González <scott.gonzalez@gmail.com>
Sat, 8 Nov 2008 05:11:54 +0000 (05:11 +0000)
committerScott González <scott.gonzalez@gmail.com>
Sat, 8 Nov 2008 05:11:54 +0000 (05:11 +0000)
ui/ui.core.js

index cae5af7e241532180ecfd221d214e7496bc6f923..402baa1ef6df4beda9d6e5ff30aab60113899078 100644 (file)
@@ -171,7 +171,7 @@ $.extend($.expr[':'], {
                
                var nodeName = a.nodeName.toLowerCase();
                function isVisible(element) {
-                       return !$(element).parents().andSelf().filter(':hidden').length;
+                       return !($(element).is(':hidden') || $(element).parents(':hidden').length);
                }
                
                return (