johnpolacek/superscrollorama

Still having issues w/start of timeline; simplified code

lisacowanyr opened this issue · 2 comments

Jan,

I've followed your suggestions and drastically simplified my code. You can see my revisions here:

http://dev.digital-module.com/lisa/

I'm running into 2 issues.

  1. The animation #fighters still starts at the beginning of the page.

  2. When it starts, the position of the div fighters is reset to: position: fixed; top: 767.-----px; left: 0px; The 767 changes dynamically. For awhile yesterday, I did have it starting at the right place in the page, but it was still fixed position to the top by 768px.

I've cleared all of the console errors.

I greatly appreciate your help and patience.

Thanks,
Lisa

Hi Lisa,

the reason for both issues is quite obvious.
It starts right at the beginning, because the starting position (left position) of your "#fighters" container is 0. So it is triggered as soon as the user starts scrolling and thus both the pin and the animations start.
Position you fighters wrapper correctly and it will work. :)

Also I noticed that you changed the superscrollorama base file setting the default for the scrolldirection (isVertical) to false.
Don't do that. Instead when calling superscrollorama as you do in your animation.js on line 6 do it like this: var controller = $.superscrollorama({isVertical: false});.

best regards,
Jan

Thanks, Jan. I'll give this a shot.

Lisa