Skip to content
Permalink
Browse files
Moves isHidden to src/css.js and re-introduces its use. No ticket. Cl…
…oses gh-876
  • Loading branch information
markelog authored and rwaldron committed Jul 25, 2012
1 parent d00048e commit 5119b25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
@@ -43,6 +43,11 @@ function vendorPropName( style, name ) {
return origName;
}

function isHidden( elem, el ) {
elem = el || elem;
return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument.documentElement, elem );
}

function showHide( elements, show ) {
var elem, display,
values = [],
@@ -65,8 +70,7 @@ function showHide( elements, show ) {
// Set elements which have been overridden with display: none
// in a stylesheet to whatever the default browser style is
// for such an element
if ( (elem.style.display === "" && curCSS( elem, "display" ) === "none") ||
!jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
if ( elem.style.display === "" && isHidden( elem ) ) {
values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
}
} else {
@@ -437,11 +437,6 @@ Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
}
};

function isHidden( elem, el ) {
elem = el || elem;
return curCSS( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument.documentElement, elem );
}

jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
var cssFn = jQuery.fn[ name ];
jQuery.fn[ name ] = function( speed, easing, callback ) {

0 comments on commit 5119b25

Please sign in to comment.