diff options
author | Saptak Sengupta <saptak013@gmail.com> | 2018-03-05 23:27:03 +0530 |
---|---|---|
committer | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2018-03-05 18:57:03 +0100 |
commit | 662083ed7bfea6bad5f9cd4060dab77c1f32aacd (patch) | |
tree | 20121cf09841f13d743d90e39b5f53c491ff6d29 /src/css/var/isHiddenWithinTree.js | |
parent | 09684ba3f210594e41ecddf369ac94c688d53ccb (diff) | |
download | jquery-662083ed7bfea6bad5f9cd4060dab77c1f32aacd.tar.gz jquery-662083ed7bfea6bad5f9cd4060dab77c1f32aacd.zip |
Core: Use isAttached to check for attachment of element
This change replaces the use of contains to check for attachment
by isAttached function
Closes gh-3977
Ref gh-3504
Diffstat (limited to 'src/css/var/isHiddenWithinTree.js')
-rw-r--r-- | src/css/var/isHiddenWithinTree.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/css/var/isHiddenWithinTree.js b/src/css/var/isHiddenWithinTree.js index 3cfb93e16..fd963a031 100644 --- a/src/css/var/isHiddenWithinTree.js +++ b/src/css/var/isHiddenWithinTree.js @@ -1,9 +1,9 @@ define( [ "../../core", - "../../selector" + "../../var/isAttached" // css is assumed -], function( jQuery ) { +], function( jQuery, isAttached ) { "use strict"; // isHiddenWithinTree reports if an element has a non-"none" display style (inline and/or @@ -27,7 +27,7 @@ define( [ // Support: Firefox <=43 - 45 // Disconnected elements can have computed display: none, so first confirm that elem is // in the document. - jQuery.contains( elem.ownerDocument, elem ) && + isAttached( elem ) && jQuery.css( elem, "display" ) === "none"; }; |