Moved a bunch of methods out of the jQuery-specific Sizzle code into more-appropriate files, in jQuery itself.
This commit is contained in:
parent
b7ccc58afe
commit
bbffc99f7c
6 changed files with 75 additions and 66 deletions
16
src/css.js
16
src/css.js
|
@ -197,3 +197,19 @@ jQuery.extend({
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
if ( jQuery.expr && jQuery.expr.filters ) {
|
||||
jQuery.expr.filters.hidden = function(elem){
|
||||
var width = elem.offsetWidth, height = elem.offsetHeight,
|
||||
force = /^tr$/i.test( elem.nodeName ); // ticket #4512
|
||||
return ( width === 0 && height === 0 && !force ) ?
|
||||
true :
|
||||
( width !== 0 && height !== 0 && !force ) ?
|
||||
false :
|
||||
!!( jQuery.curCSS(elem, "display") === "none" );
|
||||
};
|
||||
|
||||
jQuery.expr.filters.visible = function(elem){
|
||||
return !jQuery.expr.filters.hidden(elem);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue