aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2009-12-05 15:02:45 -0500
committerjeresig <jeresig@gmail.com>2009-12-05 15:02:45 -0500
commit6071e939c7025ff7096673c93eaa7e2d78afbb6b (patch)
treeeaf40a48f89940e8dfbc36a53ba6000b8f87089d /src/css.js
parentb776e2b79a5b051fba3091b0b5057ae14950f7cc (diff)
downloadjquery-6071e939c7025ff7096673c93eaa7e2d78afbb6b.tar.gz
jquery-6071e939c7025ff7096673c93eaa7e2d78afbb6b.zip
Minor syntactical changes to :visible and :hidden.
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/css.js b/src/css.js
index 0f08227b2..a16298d6c 100644
--- a/src/css.js
+++ b/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 );
};
}