Core: Optimized isVisible() for the case where the element being checked is not visible.

This commit is contained in:
Scott González 2008-11-08 05:11:54 +00:00
parent fc406b754c
commit 4addec6ac2

View 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 (