Skip to content

Commit fbaddbb

Browse files
committed
bug fixes
1 parent 935d4e8 commit fbaddbb

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

jquery.parallax.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
for (var i=0; i<length; i++) {
6161
var options = $.extend(dataOptions[i] || {}, jsOptions[i] || {});
6262
typeof options.start == "undefined" || (options.start = convertToElement(options.start));
63-
typeof options.start != "undefined" || (options.start = this);
63+
typeof options.start != "undefined" || (options.start = this[0]);
6464
typeof options.trigger != "undefined" || (options.trigger = "100%");
6565
optionsArr.push(options);
6666
}
@@ -190,7 +190,7 @@
190190
do {
191191
offset += value[axis === 'x' ? 'offsetLeft' : 'offsetTop'];
192192
} while (value = value.offsetParent);
193-
value = offset;
193+
return offset;
194194
}
195195
return value;
196196
}
@@ -199,11 +199,9 @@
199199
try {
200200
return obj instanceof HTMLElement;
201201
}
202-
catch(e){
203-
//Browsers not supporting W3 DOM2 don't have HTMLElement and
204-
return (typeof obj==="object") &&
205-
(obj.nodeType===1) && (typeof obj.style === "object") &&
206-
(typeof obj.ownerDocument ==="object");
202+
catch(e) {
203+
return (typeof obj === "object") && (obj.nodeType === 1) &&
204+
(typeof obj.style === "object") && (typeof obj.ownerDocument ==="object");
207205
}
208206
}
209207

0 commit comments

Comments
 (0)