图像重复jQuery的旋转木马 [英] images duplicate in jquery carousel
问题描述
请在这里看到小提琴: http://jsfiddle.net/2C8fy/29/
Please see the fiddle here: http://jsfiddle.net/2C8fy/29/
我有麻烦的是,有时当你点击按钮,下降,然后切换到增加按钮或反之亦然,一些对年底的幻灯片得到复制。你在上面看到的图像是获取存储阵列中的图像。他们得到保存就这样再通过阵列,用户可以循环。为什么有的当您切换按钮幻灯片重复?
The trouble I'm having is that sometimes when you click the decrease button and then switch to the increase button or vice-versa, some of the slides on the end get duplicated. The images that you see at the top are the images that get stored in the array. They get stored just like that and then the user can cycle through the array. Why are some of the slides duplication when you switch buttons?
我的理论是,它与我使用阵列的方式有问题,但我似乎无法针点吧。非常感谢!
My theory is that it's a problem with the way I'm using the array, but I can't seem to pin point it. Thanks a lot!
推荐答案
您有一个错误的变量使用。替换:
You have a wrong variable use. Replace:
VAR newImgSR = imgArr [A] .clone();
与 VAR newImgSR = imgArr [B] .clone();
在函数slide_img_right()
这篇关于图像重复jQuery的旋转木马的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!