mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Core: Optimized isVisible() for the case where the element being checked is not visible.
This commit is contained in:
parent
fc406b754c
commit
4addec6ac2
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user