Skip to content

Commit

Permalink
* return 0 if NaN (IE8 and below bugfix)
Browse files Browse the repository at this point in the history
ianmays committed Aug 28, 2012
1 parent 87541df commit 84d9e00
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
@@ -43,9 +43,10 @@
$('body').css('position','relative');
for (i=0; i<scrollorama.settings.blocks.length; i++) {
block = scrollorama.settings.blocks.eq(i);
var marginTop = block.css('margin-top');
blocks.push({
block: block,
top: block.offset().top - parseInt(block.css('margin-top'), 10),
top: block.offset().top - (!Boolean(marginTop) ? parseInt(marginTop, 10) : 0),
pin: 0,
animations:[]
});

0 comments on commit 84d9e00

Please sign in to comment.