mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Core: Rewrote isVisible(). New implementation inspired by Remy's :reallyvisible selector.
This commit is contained in:
parent
8becd36f2d
commit
8dc3f8d643
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user