Skip to content
Browse files

fixed IE8 problem determining top value with enablePin set to false

  • Loading branch information...
1 parent 15dc2fd commit 79c1e96d928fb599260190bc0697e889bf231b85 @sandropaganotti sandropaganotti committed May 6, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 js/jquery.scrollorama.js
View
3 js/jquery.scrollorama.js
@@ -181,7 +181,8 @@
var currBlockIndex = 0, i;
for (i=0; i<blocks.length; i++) {
// check if block is in view
- if (blocks[i].top <= scrollTop - scrollorama.settings.offset) { currBlockIndex = i; }
+ var offset = $(blocks[i].block).offset();
+ if (offset.top <= scrollTop - scrollorama.settings.offset) { currBlockIndex = i; }
}
return currBlockIndex;
}

2 comments on commit 79c1e96

@robtarr
robtarr commented on 79c1e96 May 8, 2012

I need to do some more testing on this, but this commit is causing the pin feature to break when you scroll back up in Chrome, Safari, Firefox, and maybe others...

@johnpolacek
Owner

Reverted back for now. Thanks

Please sign in to comment.
Something went wrong with that request. Please try again.