垂直滚动的JQuery Cloud Carousel [英] JQuery Cloud Carousel that scrolls vertically

查看:412
本文介绍了垂直滚动的JQuery Cloud Carousel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要由Cloud教授在 http://www.professorcloud上获取云端轮播。 com / mainsite / carousel.htm ,并使其垂直滚动。我可以看到,反射可能是一个垂直滚动的问题,如果他们没关系,我可以没有他们,我想要一个选项,如果可能的话。感谢您的所有帮助。 (我需要它在这里: http://www.inspiritandintruth.com 在右边的栏。)

I am looking to take the Cloud Carousel by Professor Cloud on http://www.professorcloud.com/mainsite/carousel.htm and make it scroll vertically. I can see that reflections may be an issue with a vertical scroll and if they are that's okay, I can do without them, I'd like an option to enable them if possible. Thanks for all of your help. (I need it to fit here: http://www.inspiritandintruth.com on the right bar.)

推荐答案

因此,在挖掘代码后,我终于弄明白了。如果有人试图在自己的网站上做到这一点,这里是我得到的:在非缩减版本的第260行,你有两行这样:

So after digging around the code I finally figured it out. In case anyone ever attempts to do this on their own site here's what I got: At about line 260 of the non-minified version, you have two lines like this:

x = this.xCentre + (( (funcCos(radians) * this.xRadius) - (item.orgWidth*0.5)) * scale);
y = this.yCentre + (( (sinVal * this.yRadius)  ) * scale);

只需将它们更改为:

y = this.yCentre + (( (funcCos(radians) * this.yRadius) - (item.orgWidth*0.5)) * scale);
x = this.xCentre + (( (sinVal * this.xRadius)  ) * scale);

注意x和y如何切换(3x)

Notice how the x and y have been switched (3x)

你需要弄乱初始化东西,特别是xPos和xRadius,这里是我的最终结果:

You'll need to mess around with the initialization stuff especially the xPos and xRadius, here were my end results:

$("#bookscroll").CloudCarousel({            
    xPos: 11,
    yPos: 170,
    xRadius: 16,
    yRadius: 170,
    buttonLeft: $("#book-down"),
    buttonRight: $("#book-up"),
    altBox: $("#book-alt"),
    titleBox: $("#book-title"),
    mouseWheel: true,
    bringToFront: true,
    autoRotate: 'left',
    speed: 0.02,
    autoRotateDelay: 4000
});

希望这有助于某人,你可以看到它在行动(甚至更高度定制) href =http://www.inspiritandintruth.com =nofollow> http://www.inspiritandintruth.com

Hope this helps someone, you can see it in action (and even more highly customized) at http://www.inspiritandintruth.com

这篇关于垂直滚动的JQuery Cloud Carousel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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