Jcarousel-在无限循环中首先显示最后一个图像 [英] Jcarousel - display last image first in the infinite loop

查看:106
本文介绍了Jcarousel-在无限循环中首先显示最后一个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道使用Jcarousel的人是否会对如何克隆或显示转盘的最后一个图像作为第一个图像提出建议.

轮播显示3张图像的5张照片示例如下:

1-2-3(正在显示4和5)

相反,这是我要在负载下实现的目标:

5-1-2(3和4正在等待显示)

此刻我正在使用以下设置:

换行:圆形", 滚动:1 自动:1,

我尝试过一个偏移量:-1,但这显示为空白并且不起作用.

我也尝试过使用偏移量从最后一张图片开始轮播-但是,如果将wrap设置为'circular',这也将不起作用,并且在您手动加载其他图片之前,这些图片将变为空白.

我已尽力寻找自己的答案,但在此先感谢您的帮助.

我也乐意接受其他可以做到这一点的脚本的建议-谢谢!

首先感谢您的评论.进一步的研究:我发现该站点(www.anothermag.com)很好地完成了首先显示最后一个图像的工作,我相信该图像是根据代码使用Jquery SerialScroll的.我还没有尝试过,但看起来非常有前途.我的另一个想法是查看是否可以在Wordpress循环中将最后一张图像显示为第一张,以便它仍然使用Jcarousel,但对最后一张图像进行硬编码.将发布更多更新.

编辑#3:最终解决方案:

我选择了以下Sparky672的答案,因为我认为可以肯定地说,到目前为止,Jcarousel在加载之前不进行图像重排就无法做到这一点.

但是,如果有人对选项/替代方案感兴趣,我将使用Fred HQ的出色脚本"Roundabout".我将使用的示例在此处: http://fredhq.com/projects/roundabout/demo/

只需进行一些小修改,它就可以完全满足我的需要,而无需在加载部分进行很多工作.

设置是将所有图像的不透明度设置为1,将倾斜度设置为0,以设置的间隔添加自动滚动,将框的大小设置为相同的大小.

这个特殊的轮播需要一个白色分隔线,因此我将使用在事物周围移动东西"示例,使中间的事物"成为一个白色框,以隐藏正在循环的内容.

我希望这对某人有帮助.

再次感谢!

解决方案

由于使用了损坏的选项,因此您看到这些空白图像. jCarousel是一个很棒的脚本,但是即使开发人员也承认wrap:circular 无法正常工作.开发者自己的演示显示了循环换行问题(取决于浏览器).几个月以来,他一直在谈论修复该问题.我仍然使用该插件,但是我只是不使用wrap:circular选项.

我也乐于接受其他脚本的建议,这些脚本可以 这-谢谢!

您可以尝试使用 jCarousel Lite .我需要圆形包装时使用过jCarousel Lite.

I'm wondering if anyone using Jcarousel would have a suggestion on how to clone or display the very last image of the carousel as the first image.

Example of 5 photos where the carousel shows 3 images it currently looks like this:

1 - 2 - 3 (4 and 5 are waiting to be shown)

Instead, here is what I am trying to achieve on load:

5 - 1 - 2 (3 and 4 are waiting to be shown)

What I am using at the moment is the following settings:

wrap: 'circular', scroll: 1, auto: 1,

I have tried an offset: -1 but this shows a blank and does not work.

I have also tried an offset to start the carousel with the last image - however, with wrap set to 'circular' this also does not work and makes other images blank until you manually load them.

I have done my best to look for an answer on my own but would appreciate your help, thanks in advance.

EDIT: I'm also open to suggestions of a different script that can do this - thanks!

EDIT #2: Thank you first of all to those commenting. Further research: I have found this site (www.anothermag.com) does a fine job of showing the last image first which I believe is using Jquery SerialScroll based on the code. I have yet to try this but does seem very promising. Another idea I have is to see if I can make the last image show as the first in the Wordpress Loop so that it still uses Jcarousel but hardcodes the last image. Will post more updates.

EDIT #3: final solution:

I have chosen the answer below by Sparky672 since I think it's safe to say Jcarousel as of today is not capable of doing this without intervening with rearranging images before it loads.

However, in case anyone is interested in an option/alternative, I will be using Fred HQ's excellent script "Roundabout". The example I will be using is here: http://fredhq.com/projects/roundabout/demo/around

With a few small modifications, it will do exactly what I need without much work in the loading part.

The settings would be to set opacity to 1 for all images, set tilt to 0, add auto-scroll in set interval, set size of the boxes to same size.

This particular carousel requires a white divider so I will be using the "Moving things around things" example to make the "thing" in the middle a white box to hide what is being looped behind.

I hope this helps someone.

Thanks again!

解决方案

You're seeing these blank images because you're using a broken option. jCarousel is a great script but even the developer acknowledges that wrap:circular is not working. The developer's own demo shows the circular wrap issue (depends on the browser). He's been talking about fixing it for several months now. I still use the plugin but I just don't use wrap:circular option.

EDIT: I'm also open to suggestions of a different script that can do this - thanks!

You can try jCarousel Lite as an alternative. I've used jCarousel Lite when I wanted a circular wrap.

这篇关于Jcarousel-在无限循环中首先显示最后一个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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