Permalink
Browse files

fixed jQuery undefined error when target is hidden

  • Loading branch information...
1 parent 400f4ca commit 02e054e3e896f80c4b0e55b478014148da4cf77b @kevinhamiltonsmith kevinhamiltonsmith committed Jul 9, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 js/jquery.superscrollorama.js
@@ -96,7 +96,7 @@
offset = animObj.offset;
if (typeof(target) === 'string') {
- targetOffset = $(target).offset();
+ targetOffset = $(target).offset() || {};
startPoint = superscrollorama.settings.isVertical ? targetOffset.top + scrollContainerOffset.y : targetOffset.left + scrollContainerOffset.x;
offset += offsetAdjust;
} else if (typeof(target) === 'number') {

0 comments on commit 02e054e

Please sign in to comment.