Skip to content

Commit

Permalink
fixed IE8 problem determining top value with enablePin set to false
Browse files Browse the repository at this point in the history
  • Loading branch information
sandropaganotti committed May 6, 2012
1 parent 15dc2fd commit 79c1e96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/jquery.scrollorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 79c1e96

Please sign in to comment.