r883 - trunk/ui
r883 - trunk/ui
Author: scott.gonzalez
Date: Fri Nov 7 21:11:54 2008
New Revision: 883
Modified:
trunk/ui/ui.core.js
Log:
Core: Optimized isVisible() for the case where the element being checked is
not visible.
Modified: trunk/ui/ui.core.js
==============================================================================
--- trunk/ui/ui.core.js (original)
+++ trunk/ui/ui.core.js Fri Nov 7 21:11:54 2008
@@ -171,7 +171,7 @@
var nodeName = a.nodeName.toLowerCase();
function isVisible(element) {
- return !$(element).parents().andSelf().filter(':hidden').length;
+ return !($(element).is(':hidden') ||
$(element).parents(':hidden').length);
}
return (