Core: Rewrote isVisible(). New implementation inspired by Remy's :reallyvisible selector.

This commit is contained in:
Scott González 2008-11-07 13:40:01 +00:00
parent 8becd36f2d
commit 8dc3f8d643

View File

@ -168,21 +168,10 @@ $.extend($.expr[':'], {
// TODO: add support for object, area
tabbable: function(a, i, m) {
var nodeName = a.nodeName.toLowerCase();
function isVisible(element) {
function checkStyles(element) {
var style = element.style;
return (style.display != 'none' && style.visibility != 'hidden');
}
var visible = checkStyles(element);
(visible && $.each($.dir(element, 'parentNode'), function() {
return (visible = checkStyles(this));
}));
return visible;
return !$(element).parents().andSelf().filter(':hidden').length;
}
return (