aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.core.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-11-08 05:11:54 +0000
committerScott González <scott.gonzalez@gmail.com>2008-11-08 05:11:54 +0000
commit4addec6ac26ff479f920607b258dabacf2ff481a (patch)
tree6f1bda8c25204572cfcfc4f5c5b7c1f857f693fb /ui/ui.core.js
parentfc406b754ced61338b553133c7225367bca1534f (diff)
downloadjquery-ui-4addec6ac26ff479f920607b258dabacf2ff481a.tar.gz
jquery-ui-4addec6ac26ff479f920607b258dabacf2ff481a.zip
Core: Optimized isVisible() for the case where the element being checked is not visible.
Diffstat (limited to 'ui/ui.core.js')
-rw-r--r--ui/ui.core.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js
index cae5af7e2..402baa1ef 100644
--- a/ui/ui.core.js
+++ b/ui/ui.core.js
@@ -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 (