X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=inline;f=src%2Foffset.js;h=69f624dbe46c8dd56ffec49f52e4bd254b145622;hb=10ab08de439130ead59d6cc1c31917f2869f923f;hp=5c600cc2e9617e8d1b99a2aebb03288660a83d7b;hpb=464535e0965d5de617a24e608a2d05393194c3fd;p=jquery.git
diff --git a/src/offset.js b/src/offset.js
index 5c600cc..69f624d 100644
--- a/src/offset.js
+++ b/src/offset.js
@@ -50,10 +50,10 @@ else
jQuery.offset = {
initialize: function() {
if ( this.initialized ) return;
- var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, rules, prop, bodyMarginTop = body.style.marginTop,
- html = '
';
+ var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop,
+ html = '';
- rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' }
+ rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' };
for ( prop in rules ) container.style[prop] = rules[prop];
container.innerHTML = html;
@@ -131,9 +131,9 @@ jQuery.each( ['Left', 'Top'], function(i, name) {
var method = 'scroll' + name;
jQuery.fn[ method ] = function(val) {
- if (!this[0]) return;
+ if (!this[0]) return null;
- return val != undefined ?
+ return val !== undefined ?
// Set the scroll offset
this.each(function() {