"./var/rcssNum",
"./css/var/rnumnonpx",
"./css/var/cssExpand",
- "./css/var/isHidden",
"./css/var/getStyles",
"./css/var/swap",
"./css/curCSS",
"./core/ready",
"./selector" // contains
], function( jQuery, pnum, access, rmargin, document, rcssNum, rnumnonpx, cssExpand,
- isHidden, getStyles, swap, curCSS, adjustCSS, addGetHookIf, support ) {
+ getStyles, swap, curCSS, adjustCSS, addGetHookIf, support ) {
var
define( [
"../core",
"../data/var/dataPriv",
- "../css/var/isHidden"
-], function( jQuery, dataPriv, isHidden ) {
+ "../css/var/isHiddenWithinTree"
+], function( jQuery, dataPriv, isHiddenWithinTree ) {
var defaultDisplayMap = {};
}
return this.each( function() {
- if ( isHidden( this ) ) {
+ if ( isHiddenWithinTree( this ) ) {
jQuery( this ).show();
} else {
jQuery( this ).hide();
+++ /dev/null
-define( [
- "../../core",
- "../../selector"
-
- // css is assumed
-], function( jQuery ) {
-
- return function( elem, el ) {
-
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" ||
- !jQuery.contains( elem.ownerDocument, elem );
- };
-} );
--- /dev/null
+define( [
+ "../../core",
+ "../../selector"
+
+ // 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 ) {
+
+ // 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" ||
+ !jQuery.contains( elem.ownerDocument, elem );
+ };
+} );
"./var/rcssNum",
"./var/rnotwhite",
"./css/var/cssExpand",
- "./css/var/isHidden",
+ "./css/var/isHiddenWithinTree",
"./css/var/swap",
"./css/adjustCSS",
"./data/var/dataPriv",
"./manipulation",
"./css",
"./effects/Tween"
-], function( jQuery, document, rcssNum, rnotwhite, cssExpand, isHidden, swap,
+], function( jQuery, document, rcssNum, rnotwhite, cssExpand, isHiddenWithinTree, swap,
adjustCSS, dataPriv, showHide ) {
var
anim = this,
orig = {},
style = elem.style,
- hidden = elem.nodeType && isHidden( elem ),
+ hidden = elem.nodeType && isHiddenWithinTree( elem ),
dataShow = dataPriv.get( elem, "fxshow" );
// Queue-skipping animations hijack the fx hooks
fadeTo: function( speed, to, easing, callback ) {
// Show any hidden elements after setting opacity to 0
- return this.filter( isHidden ).css( "opacity", 0 ).show()
+ return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()
// Animate to the value specified
.end().animate( { opacity: to }, speed, easing, callback );