简体   繁体   English

Tumblr上的无限水平滚动

[英]Infinite Horizontal Scroll on Tumblr

I'm not sure if any of you are familiar with Tumblr but I'm simply trying to attain a HORIZONTAL infinite scroll. 我不确定你们中是否有人熟悉Tumblr,但我只是想尝试获得HORIZONTAL无限滚动。 Vertical infinite scrolls are easy to find. 垂直无限卷轴很容易找到。

Now, I did find one on jsfiddle: 现在,我确实在jsfiddle找到了一个:

jsfiddle.net/URCwd/20 jsfiddle.net/URCwd/20

Unfortunately, I don't know how to incorporate it into the Tumblr HTML. 不幸的是,我不知道如何将它合并到Tumblr HTML中。

Can someone please help me? 有人可以帮帮我吗?

Do you mean something like this: 你的意思是这样的:

$(document).ready(function() {  
    $(window).scroll(function() {
        if ( $(window).scrollLeft() >= ($('body').width() - $(window).width()) ) {
            $('body').width('+=100');
        } 
    });
});

I did this on one of my themes by using Paul Irish's infinite scroll jquery plugin and essentially changing all the height s to width s and the top s to left s. 我通过使用Paul Irish的无限滚动jquery插件在我的一个主题上做到了这一点,并且基本上将所有height s更改为width s,将top s更改为left s。 Sounds rather fiddly but worked like a charm. 听起来相当繁琐,但工作就像一个魅力。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM