需要帮助根据类名居中缩略图 - Jquery
我一直在开发一个幻灯片组件,它是 jcycle 和 jcarousel 的混合体。它工作得相当好,但我要补充的最后一个功能我无法弄清楚。现在,如果您单击缩略图,只要它不是前 2 个或最后 2 个拇指,它就会将其置于轮播中心。这非常有效,我喜欢将幻灯片放映的活动缩略图居中。
我遇到的问题是,如果用户点击幻灯片上的播放按钮或下一张和上一张幻灯片按钮,幻灯片会循环播放,但活动幻灯片缩略图不会在轮播中居中。我尝试检查缩略图锚点是否具有类、activeSlide,如果有则将其居中,但未成功,但似乎无法使其工作。
这是我一直在开发的演示页面的链接。
http://brettjankord.com/standards/slideshows/jslideshow-test2.php
非常感谢任何帮助!
I have a slide show component I've been working on that is a mash up of jcycle and jcarousel. It works rather well, yet there is one last feature I'd to add that I cannot figure out. Right now if you click on a thumbnail it will center it in the carousel as long as it's not the first 2 or last 2 thumbs. This works great and I like centering the active thumbnail of the slide show.
The problem I'm running into is if the user hits the play button on the slide show or the next and previous slide buttons, the slide show cycles, yet the active slide thumbnail does not center in the carousel. I've tried unsuccessfully to check if the thumbnail anchor has class, activeSlide, and if so to center it, yet cant seem to get it to work.
Here is a link to the demo page I've been working on.
http://brettjankord.com/standards/slideshows/jslideshow-test2.php
Any help is greatly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
onBefore
方法演示的末尾将以下内容放在http://jsfiddle.net 的 /JupPn/1/
Put the following at the end of your
onBefore
methodDemo at http://jsfiddle.net/JupPn/1/