Minor syntactical changes to :visible and :hidden.
This commit is contained in:
parent
b776e2b79a
commit
6071e939c7
1 changed files with 8 additions and 8 deletions
16
src/css.js
16
src/css.js
|
@ -200,18 +200,18 @@ jQuery.extend({
|
|||
});
|
||||
|
||||
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,
|
||||
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 :
|
||||
width !== 0 && height !== 0 && !force ?
|
||||
false :
|
||||
jQuery.curCSS(elem, "display") === "none";
|
||||
width > 0 && height > 0 && !skip ?
|
||||
false :
|
||||
jQuery.curCSS(elem, "display") === "none";
|
||||
};
|
||||
|
||||
jQuery.expr.filters.visible = function(elem){
|
||||
return !jQuery.expr.filters.hidden(elem);
|
||||
jQuery.expr.filters.visible = function( elem ) {
|
||||
return !jQuery.expr.filters.hidden( elem );
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue