aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-01-23 12:52:39 -0500
committerjeresig <jeresig@gmail.com>2010-01-23 12:52:39 -0500
commit8ea634fd07afb58c6eac3ef994adf562292fafe7 (patch)
tree4095f7479df399d923c416282928ae2e575ac931 /src
parentf6ec9d54d11432b91577addab6e613fb1f7a5203 (diff)
parent2c28f229e5eb49f1469fd36ee979529a492f0f42 (diff)
downloadjquery-8ea634fd07afb58c6eac3ef994adf562292fafe7.tar.gz
jquery-8ea634fd07afb58c6eac3ef994adf562292fafe7.zip
Merge branch 'master' of github.com:jquery/jquery
Diffstat (limited to 'src')
-rw-r--r--src/effects.js4
-rw-r--r--src/offset.js16
2 files changed, 10 insertions, 10 deletions
diff --git a/src/effects.js b/src/effects.js
index ff2f145b8..7fa734208 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -13,7 +13,7 @@ var elemdisplay = {},
jQuery.fn.extend({
show: function( speed, callback ) {
- if ( speed != null ) {
+ if ( speed || speed === 0) {
return this.animate( genFx("show", 3), speed, callback);
} else {
@@ -57,7 +57,7 @@ jQuery.fn.extend({
},
hide: function( speed, callback ) {
- if ( speed != null ) {
+ if ( speed || speed === 0 ) {
return this.animate( genFx("hide", 3), speed, callback);
} else {
diff --git a/src/offset.js b/src/offset.js
index c3183743b..f80574eea 100644
--- a/src/offset.js
+++ b/src/offset.js
@@ -2,16 +2,16 @@ if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
var elem = this[0];
- if ( !elem || !elem.ownerDocument ) {
- return null;
- }
-
if ( options ) {
return this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
}
+ if ( !elem || !elem.ownerDocument ) {
+ return null;
+ }
+
if ( elem === elem.ownerDocument.body ) {
return jQuery.offset.bodyOffset( elem );
}
@@ -28,16 +28,16 @@ if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
var elem = this[0];
- if ( !elem || !elem.ownerDocument ) {
- return null;
- }
-
if ( options ) {
return this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
}
+ if ( !elem || !elem.ownerDocument ) {
+ return null;
+ }
+
if ( elem === elem.ownerDocument.body ) {
return jQuery.offset.bodyOffset( elem );
}