连续循环页面(非无限滚动) [英] Continuous Looping Page (Not Infinite Scroll)

查看:113
本文介绍了连续循环页面(非无限滚动)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找创建滚动功能的资源,例如在这些站点上找到的滚动功能:
Outpost Journal
展开

I'm looking for resources that create scrolling functions like the ones found on these sites:
Outpost Journal
Unfold

一旦滚动条到达页面底部,我希望它循环回到顶部. 我对无限滚动很熟悉,这不是我想要的.我还发现了可以在页面底部写入/添加相同内容的脚本,但是没有一个脚本可以循环回到页面顶部.

Once the scroll bar hits the bottom of the page, I want it to loop back to the top. I'm familiar with with the infinite scroll, and this is not what I want. I've also found scripts that will write/add the same content to the bottom of the page, but none that loop back to the top of the page.

推荐答案

尝试一下:

   $('document').ready(function() {
             $(document).scroll(function(){
             if(document.documentElement.clientHeight + 
             $(document).scrollTop() >= document.body.offsetHeight )$(document).scrollTop(0);
             });
          }); 

这篇关于连续循环页面(非无限滚动)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆