Skip to content
Permalink
Browse files

Core: Rewrote isVisible(). New implementation inspired by Remy's :rea…

…llyvisible selector.
  • Loading branch information...
scottgonzalez committed Nov 7, 2008
1 parent 8becd36 commit 8dc3f8d64394992f312a3ec41675ae1d0f92b465
Showing with 2 additions and 13 deletions.
  1. +2 −13 ui/ui.core.js
@@ -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 (

0 comments on commit 8dc3f8d

Please sign in to comment.
You can’t perform that action at this time.