Prinzhorn / skrollr

Stand-alone parallax scrolling library for mobile (Android + iOS) and desktop. No jQuery. Just plain JavaScript (and some love).
http://prinzhorn.github.io/skrollr/
MIT License
18.52k stars 3.49k forks source link

skrollr-body cutting off site and being buggy on mobile #723

Open idesignpixels opened 9 years ago

idesignpixels commented 9 years ago

I'm trying to use the skrollr to create a website. I use some fixed sections at the top (header & slide-1) then skrollr-body with some more sections inside. *Example is here http://www.dalebailey.co.uk/idesignpixels/home.html It works fine on standard browsers but for some reason cuts off and behaves strangely before and after orientation changes on mobile. It cuts off about 2/3rds down on load then if I rotate back and forth it will go all the way and sometimes even adds too much space at the bottom then my logo animation at the top disappears. after refresh it happens again.

I have...
initialised at the bottom but it behaves as if it isn't. checked without javascript, works perfectly. no fixed items inside skrollr-body added some blank data commands within #skrollr-body so it knows where the end is. styled skrollr-body with height which works but is useless for responsive design. used jQuery to style skrollr-body height based on the child elements which seems to be overridden on mobile for some reason. played around with forceHeight:false; used the .imagesLoaded(function() disabled other have scripts. checked other issues on here and everywhere else and implemented many more things without any luck.

please help the example is here http://www.dalebailey.co.uk/idesignpixels/home.html

3nki commented 9 years ago

i had this issue on mobile in Chrome browser on iOS. i can't get skrollr to even load in Safari. but in Chrome i was able to fix the issue where it only went down part of the page by adding forceHeight to the init, but it had to be a particular syntax. i used this at the end of my HTML file:

var s = skrollr.init({
  forceHeight: false
});
skrollr.menu.init(s);
idesignpixels commented 9 years ago

Hey thanks for the input, I'll be honest I gave up on it and started learning scrollmagic aka scrollarama along with greensock. If anyone else was like me and had a quick look but we're put off by how complicated it looks it really isn't. It gives a completely new dimension of control and compatibility and I would highly recommend it to anyone wanting to go past basic parallax and animations as skrollr seems to have a lot of knock on affects that can be frustrating, although I appreciate the simplicity of its integration.