Trying to create an infinite horizontal scroll - preferably using a jquery plugin

人盡茶涼 提交于 2019-11-30 15:40:14

What it appears they're doing on unfold.no is jumping back to the top of the page when you reach the bottom. Since the background is seamless it appears to be an infinite scroll.

Here is a demo I created: http://jsfiddle.net/wdm954/URCwd/4/

Only thing in the jQuery you should have to edit is the first line.


By default in the CSS I set the body height to the height of the background image. However in the jQuery I dynamically change this to add the height of the window. This addition height gives it a smooth infinite scroll effect.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!