mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
CSS: isHidden -> isHiddenWithinTree
Fixes gh-2404 Close gh-2855
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../data/var/dataPriv",
|
||||
"../css/var/isHidden"
|
||||
], function( jQuery, dataPriv, isHidden ) {
|
||||
"../css/var/isHiddenWithinTree"
|
||||
], function( jQuery, dataPriv, isHiddenWithinTree ) {
|
||||
|
||||
var defaultDisplayMap = {};
|
||||
|
||||
@@ -95,7 +95,7 @@ jQuery.fn.extend( {
|
||||
}
|
||||
|
||||
return this.each( function() {
|
||||
if ( isHidden( this ) ) {
|
||||
if ( isHiddenWithinTree( this ) ) {
|
||||
jQuery( this ).show();
|
||||
} else {
|
||||
jQuery( this ).hide();
|
||||
|
||||
@@ -5,9 +5,11 @@ define( [
|
||||
// css is assumed
|
||||
], function( jQuery ) {
|
||||
|
||||
// This function differs from the :hidden selector
|
||||
// in that it intentionally ignores hidden ancestors (gh-2404)
|
||||
return function( elem, el ) {
|
||||
|
||||
// isHidden might be called from jQuery#filter function;
|
||||
// isHiddenWithinTree might be called from jQuery#filter function;
|
||||
// in that case, element will be second argument
|
||||
elem = el || elem;
|
||||
return jQuery.css( elem, "display" ) === "none" ||
|
||||
Reference in New Issue
Block a user