mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Minor syntactical changes to :visible and :hidden.
This commit is contained in:
parent
b776e2b79a
commit
6071e939c7
@ -202,11 +202,11 @@ jQuery.extend({
|
|||||||
if ( jQuery.expr && jQuery.expr.filters ) {
|
if ( jQuery.expr && jQuery.expr.filters ) {
|
||||||
jQuery.expr.filters.hidden = function( elem ) {
|
jQuery.expr.filters.hidden = function( elem ) {
|
||||||
var width = elem.offsetWidth, height = elem.offsetHeight,
|
var width = elem.offsetWidth, height = elem.offsetHeight,
|
||||||
force = /^tr$/i.test( elem.nodeName ); // ticket #4512
|
skip = elem.nodeName.toLowerCase() === "tr";
|
||||||
|
|
||||||
return width === 0 && height === 0 && !force ?
|
return width === 0 && height === 0 && !skip ?
|
||||||
true :
|
true :
|
||||||
width !== 0 && height !== 0 && !force ?
|
width > 0 && height > 0 && !skip ?
|
||||||
false :
|
false :
|
||||||
jQuery.curCSS(elem, "display") === "none";
|
jQuery.curCSS(elem, "display") === "none";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user